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

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

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

³ÌªñÂà´«®æ¦¡¹J¨£¤@­Ó°ÝÃD,¾É¥X¤u§@ªí¨ìTXT¤åÀɮɭÔ,²ö¦W¨ä§®¦h¤F«Ü¦h ""
·íµM¤]¦³¨Ç¦a¤è¬O¦h¥X¨Ó" ²Å¸¹.·Pı¤ñ¸ûÀH¾÷.
¨Ò¦pªþ¥óÀÉ®× 149¦æ 298¦æ 470¦æ 729¦æµ¥¾É¥X¦Z³£·|Åܦ¨. "" ©Î ". ¦³®É­Ô¬OÂù¤Þ¸¹,¦³®É­Ô¬O³æ¤Þ¸¹
¬d¸ê®Æ´£¨ìVBA ¥i¥H¸Ñ¨M,¦ý¬O¤£¤Ó²z¸Ñ«ç»ò³B²z,Áٽаª¤â«üÂI,ÁÂÁÂ!
¦pªG¯àª½±µ³B²z¦n³o­Ó¤u§@ªí·íµM§ó¦n,«ôÁÂ!

string.rar (111.08 KB)

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2015-10-15 19:04 ½s¿è

¦^´_ 1# dbv002
½Æ»sÀx¦s®æ«á¦A¶K¨ì¤å¦rÀɤñ¸û§Ö¡C¡C¡C

§A»¡ªº¶×¥X¦¨txt ¬O«ü¶×¥Xcsv§a...
csv ¬O'³r¸¹¤À¹j'¤å¦rÀÉ¡A¨º¨Ç¤Þ¸¹¬O¦³¨ä²z¥Ñ¦Ó¤£¬O²ö¦W¨ä§®ªº¡C
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_  dbv002
½Æ»sÀx¦s®æ«á¦A¶K¨ì¤å¦rÀɤñ¸û§Ö¡C¡C¡C

§A»¡ªº¶×¥X¦¨txt ¬O«ü¶×¥Xcsv§a...
csv ¬O'³r¸¹ ...
stillfish00 µoªí©ó 2015-10-15 18:55



    ¶×¥XªºUNICODEªº TXT¤åÀÉ,¹Á¸Õ¹L½Æ»s,¦n¹³µLªk±q®Ú¥»¸Ñ¨M¦¹°ÝÃD,¦]¬°¤U¦¸±qexcel¾É¥X¦Z¨ÌµMÁÙ¬O¦³Âù¤Þ¸¹,»Ý­n¸Ñ¨Mªþ¥óªºexcelªº°ÝÃD

TOP

¦^´_ 3# dbv002
¸Õ¸Õ§a...
  1. Public Sub ExportUnicodeWithoutQuote()
  2.     Set ws = ActiveSheet
  3.     Dim sFile As String
  4.    
  5.     sFile = Application.GetSaveAsFilename("", "Unicode Text File (*.txt), *.txt")
  6.     If sFile = "False" Then Exit Sub
  7.    
  8.     Const adTypeBinary = 1
  9.     Const adTypeText = 2
  10.     Const adSaveCreateOverWrite = 2

  11.     Dim oStream: Set oStream = CreateObject("ADODB.Stream")
  12.     oStream.Charset = "UTF-8"
  13.     oStream.Type = adTypeText
  14.     oStream.Open
  15.    
  16.     Dim ar: ar = ws.[A1].CurrentRegion.Value
  17.     Dim s As String
  18.     For r = 1 To UBound(ar)
  19.         For c = 1 To UBound(ar, 2)
  20.             s = IIf(c = 1, ar(r, c), s & vbTab & ar(r, c))
  21.         Next
  22.         oStream.writeText s, adTypeBinary
  23.     Next

  24.     oStream.SaveToFile sFile, adSaveCreateOverWrite
  25.     oStream.Close
  26. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

ÁÂÁÂ,°ÝÃD¤w¸g¸Ñ¨M! ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD