Re: [問題] VBA讀取TXT格式問題
Sub test()
Dim qt As QueryTable
Set qt = ActiveSheet.QueryTables.Add("TEXT;d:\20160703.txt", [a1])
With qt
.AdjustColumnWidth = False
.TextFileParseType = xlDelimited
.TextFileTabDelimiter = True
.TextFileCommaDelimiter = True
.Refresh
End With
End Sub
用以上方式 , excel讀取會空一格 , 麻煩大大
https://www.dropbox.com/s/4uxgfuykhl0h6ix/VBA%20TAB%20format.PNG?dl=0
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.241.96.6
※ 文章網址: https://www.ptt.cc/bbs/Office/M.1468069184.A.DB2.html
→
07/09 21:18, , 1F
07/09 21:18, 1F
→
07/09 21:18, , 2F
07/09 21:18, 2F
→
07/09 21:20, , 3F
07/09 21:20, 3F
→
07/09 21:27, , 4F
07/09 21:27, 4F
→
07/09 21:28, , 5F
07/09 21:28, 5F
→
07/09 21:28, , 6F
07/09 21:28, 6F
→
07/09 21:31, , 7F
07/09 21:31, 7F
→
07/09 21:38, , 8F
07/09 21:38, 8F
→
07/09 21:41, , 9F
07/09 21:41, 9F
→
07/09 21:42, , 10F
07/09 21:42, 10F

討論串 (同標題文章)
完整討論串 (本文為第 3 之 3 篇):
Office 近期熱門文章
PTT數位生活區 即時熱門文章