- ©«¤l
- 95
- ¥DÃD
- 29
- ºëµØ
- 0
- ¿n¤À
- 150
- ÂI¦W
- 0
- §@·~¨t²Î
- windows2003
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Kaoshiung
- µù¥U®É¶¡
- 2010-11-5
- ³Ì«áµn¿ý
- 2018-2-8
|
[µo°Ý] ½Ð±Ðª©¥D,¦p¦ó¦bExcel¤u§@ªí¤W¿é¥X¬°txtÀÉ«á,©óÄæ¦ì¤W¼W¥[«_¸¹?
Dear ª©¥D¤Î¦U¦ì¤j¤j̱z¦n :
¤p§Ì¦³¤@°ÝÃD,¦b¤u§@ªí¤º®e¿é¥X¬°¤å¦rÀÉ«á,·Q¦bAÄ椧¤å¦r«á§¡¥[«_¸¹,¨ä¾l¬Ò¨Ì³yìµ{¦¡³]©w,¤£ª¾¸Ó¦p¦ó×¥¿µ{¦¡,½Ð¦U¦ì¥ý¶i¤Îª©¥D¤£§[«ü¥¿,·P®¦!
- Sub TextExport()
- Dim rng As Range
- Dim iWks As Integer, iRow As Long, iCol As Integer
- Dim sTxt As String, sPath As String
- Dim ff As Integer
- ff = FreeFile
- sPath = ThisWorkbook.Path & "\"
- For iWks = 2 To Worksheets.Count
- Open sPath & Worksheets(iWks).Name & ".txt" For Output As #ff
- Set rng = Worksheets(iWks).UsedRange
- For iRow = 2 To rng.Rows.Count + 1
- For iCol = 1 To rng.Columns.Count
- If sTxt = "___" Then
- sTxt = sTxt & " "
- Else
- sTxt = sTxt & Format(Worksheets(iWks).Cells(iRow, iCol).Value, "000") & " "
- End If
- Next iCol
- Print #ff, sTxt
- sTxt = vbNullString
- Next iRow
- Close #ff
- Next iWks
- End Sub
½Æ»s¥N½X
°ÝÃDµo°Ý_20131101_Q.zip (14.27 KB)
|
|