- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
§ó¥¿,¥H¤U¤è¦¡¥i¥H¦¨¥\ÂରUTF8+CSV- Sub saveUnicodeCSV()
- Set oAdoS = CreateObject("ADODB.Stream")
- oAdoS.Charset = "UTF-8"
- oAdoS.Mode = 3
- oAdoS.Type = 2
- oAdoS.Open
- lRow = 1
- lCol = 1
- Do Until Sheets(1).Cells(lRow, lCol).Value = ""
- oAdoS.WriteText (Sheets(1).Cells(lRow, lCol).Text)
- lCol = lCol + 1
- Do Until Sheets(1).Cells(lRow, lCol).Value = ""
- oAdoS.WriteText ("," & Sheets(1).Cells(lRow, lCol).Text)
- lCol = lCol + 1
- Loop
- oAdoS.WriteText (vbCrLf)
- lCol = 1
- lRow = lRow + 1
- Loop
- oAdoS.SaveToFile "c:\test.csv", 2
- oAdoS.Close
- Set oAdoS = Nothing
- End Sub
½Æ»s¥N½X |
|