ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¤u§@ªí¶×¥X¦¨txt«á¡A¸ê®Æ¤º®e¦³¦h¥XÂù¤Þ¸¹°ÝÃD

[µo°Ý] ½Ð°Ý¤u§@ªí¶×¥X¦¨txt«á¡A¸ê®Æ¤º®e¦³¦h¥XÂù¤Þ¸¹°ÝÃD

½Ð¨DÀ°§U¸Ñµª°ÝÃD~~
½Ð°Ý¤u§@ªí¶×¥X¦¨txt¡AµM«á¥´¶}¶×¥XªºtxtÀÉ
¸ê®Æ¤º®e¬°¤°»ò¦³¦h¥XÂù¤Þ¸¹
¦p¤U¤G¦C¤å¦r¡A³Ì«e­±¤Î³Ì«á­±³£¦³Âù¤Þ¸¹
"<Placemark><name>´ºÂI1</name><Point><coordinates>120.1,23.1,0</coordinates></Point></Placemark>"
"<Placemark><name>´ºÂI2</name><Point><coordinates>120.2,23.2,0</coordinates></Point></Placemark>"
¦bexcelÀÉ¥»¨Ó¨S¦³ªº
½Ð°Ý¦p¦óÅý¶×¥XªºtxtÀɤ£­n¦³Âù¤Þ¸¹
¦p¤U¤G¦C¤å¦r
<Placemark><name>´ºÂI1</name><Point><coordinates>120.1,23.1,0</coordinates></Point></Placemark>
<Placemark><name>´ºÂI2</name><Point><coordinates>120.2,23.2,0</coordinates></Point></Placemark>
ªþ¤Wªþ¥ó
ÁÂÁÂ!

1000724.rar (12.14 KB)

¦^´_ 1# pesi2884

ÅãµM¬O¦]¬°§A¦P¤@®æ¤¤ªº¸ê®Æ¦³","¸¹
¦]¬°excel ¥iÂରcsv®æ¦¡ ¦U®æ¤§¶¡´N¬O¥H","¸¹°Ï¹jªº
¸ÕµÛ±N§A²Ä¤@®æ(A1)¤¤ªº","¸¹³£§ï¦¨"#"¸¹ (A2«h¤£§ï)
«h¥Hnotepad Ū¥Xªºµ²ªG¦p¤U¡G
<Placemark><name>???I1</name><Point><coordinates>120.1#23.1#0</coordinates></Point></Placemark>
"<Placemark><name>???I2</name><Point><coordinates>120.2,23.2,0</coordinates></Point></Placemark>"

TOP

¦^´_ 1# pesi2884
¦pinfoverdad »¡§A¦r¦ê¦³³r¸¹","  ¥i¸Õ¥Î¤Uªk¦s¬°txt
  1. Sub Ex()
  2.     Dim i%, FileName
  3.     FileName = "D:\TEST\1000724.txt"       '«Ø¥ßÀɮצWºÙ¡C"
  4.     Open FileName For Output As #1      '¶}±ÒÀɮסC
  5.     Do While Cells(i + 1, "A") <> ""
  6.         Print #1, Cells(i + 1, "A")     '±N¦r¦ê¼g¤JÀɮסC"
  7.         i = i + 1
  8.     Loop
  9.     Close #1                            ' ±NÀÉ®×Ãö³¬¡C
  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# GBKEE


ÁÂÁÂGBKEE±zªº¦^µª¡A¦³¹F¨ì·Q­nªºµ²ªG
¦ý¬O§Ú¦]¬°¦³³\¦h¬Û¦P¸ê®ÆÃþ«¬ªº(¦³¤W¦Ê­Ó)¤u§@ªí
­n¦s¦¨³\¦h(¦³¤W¦Ê­Ó)ÀÉ®×
°²³]ªþ¥ó¤º¦³3­Ó¤u§@ªí¡A¤À§O¬° ¶³ªL~¤¤¬ü¡B°ª¶¯~¾Á¤B¡B«ÌªF~¹Å¸q
¨º¦p¦ó¶×¥X¦¨¤À§O¬° ¶³ªL~¤¤¬ü.txt¡B°ª¶¯~¾Á¤B.txt¡B«ÌªF~¹Å¸q.txt
½Ð°Ý¸Ó­n«ç»ò¼g¡A¤£¦n·N«ä¡A§Úªºµ{¦¡»y¨¥¯à¤OÁÙ«Ü®z
©Ò¥H»Ý­n±zªºÀ°¦£¡AÁÂÁ§A§r!

1000724-1.rar (14.48 KB)

TOP

¦^´_ 4# pesi2884
¸Õ¸Õ¬Ý
  1. Sub Ex()
  2.     Dim Sh As Worksheet, FileName As String, i%
  3.     For Each Sh In Sheets
  4.         FileName = "D:\"       '«Ø¥ßÀɮ׸ê®Æ§¨"
  5.         Open FileName & Sh.Name & ".txt" For Output As #1    '¶}±ÒÀɮסC
  6.         i = 1
  7.         Do While Sh.Cells(i, "A") <> ""
  8.             Print #1, Sh.Cells(i, "A")      '±N¦r¦ê¼g¤JÀɮסC"
  9.             i = i + 1
  10.         Loop
  11.         Close #1                            ' ±NÀÉ®×Ãö³¬¡C
  12.     Next
  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# GBKEE


ÁÂÁª©¥D!
¥i¥H¤F

TOP

¦^´_ 5# GBKEE

¤£¦n·N«ä¡A¦A°Ý¤@¤U
©Ó­è­èª©¥D¤j¤j±zªº¦^Âе{¦¡¸Ì
¦pªG¶×¥XªºÀÉ®×­n¦³¥H¤Uªº®æ¦¡
FileFormat:=xlUnicodeText, CreateBackup:=False
µ{¦¡¸Ó¦p¦ó¼g
¦]¬°­nªº¦¨ªG¡A»PÀɮ׮榡¦³Ãö¡AÁÂÁÂ

TOP

¦^´_ 7# pesi2884
  1. Sub Ex()
  2.     Dim Fs As Object
  3.     Dim Sh As Worksheet, FileName As String, i%
  4.     For Each Sh In Sheets
  5.        FileName = "D:\"       '«Ø¥ßÀɮ׸ê®Æ§¨"
  6.         Set Fs = CreateObject("Scripting.FileSystemObject").OpenTextFile(FileName & Sh.Name & ".txt", 8, True, -1)
  7.         'FileSystemObjectª«¥ó,´£¨Ñ¹ï¹q¸£Àɮרt²Îªº¦s¨ú¡C OpenTextFile  ¶}±ÒÀÉ®×.
  8.         '8 -> ForAppending:  ¶}±Ò¤@­ÓÀɮרüg¿é¥X¦ÜÀɮתº§À³¡¡C1 -> ForReading:¶}±Ò¤@­Ó°ßŪÀɮסCµLªk¹ï¦¹Àɮ׶i¦æ¼g¤J¡C
  9.         'True: ¥¦ªí¥Ü¦pªG«ü©wªº filename ¤£¦s¦b¬O§_¥i¥H«Ø¥ß¤@­Ó¶}·sÀɮסC¦pªG«Ø¥ß¶}·sÀɮסA¨ä­È¬° True¡C­Y¤£«Ø¥ßÀɮרä­È¬° False¡C¹w³]­È¬° False¡C
  10.         '-1 ¥H Unicode ®æ¦¡¶}±ÒÀɮסC¦pªG¬Ù²¤¡A«hÀÉ®×¥H ASCII ®æ¦¡¶}±Ò¡C
  11.         
  12.         'Set Fs = CreateObject("Scripting.FileSystemObject").CreateTextFile(FileName & Sh.Name & ".txt", True, True)
  13.         'CreateTextFile  ·s«ØÀÉ®×,
  14.         '²Ä1­Ó True: ªí¥Ü¤@­Ó¤w¦s¦bÀɮ׬O§_¥i³QÂл\¡C¦pªG¥i³QÂл\¨ä­È¬° True¡A¨ä¬° False ®ÉµLªkÂл\,¹w³]­È¬°False.
  15.         '²Ä2­Ó True: ¡C¦pªG§@¬°¤@­Ó Unicode Àɮ׫إߡA¨ä¬° True¡A§@¬°¤@­Ó ASCII Àɮ׫إߡA¨ä¬° False¡C¹w³]­È¬°False
  16.         i = 1
  17.         Do While Sh.Cells(i, "A") <> ""
  18.             Fs.Write Sh.Cells(i, "A")      '±N¦r¦ê¼g¤J©³ºÝ¡C"
  19.             Fs.WriteLine                    '´«¦æ
  20.             i = i + 1
  21.         Loop
  22.         Fs.Close                             ' ±NÀÉ®×Ãö³¬¡C
  23.     Next
  24. End Sub
½Æ»s¥N½X

TOP

¦^´_ 8# GBKEE


    ÁÂÁª©¥D¡A¸Õ¹L«á¥i¥H¤F¡A«D±`·P®¦¡C

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD