20/01/03 19:58:54.81 k7eftYc7x.net
そんなにハードル高いか?
テキストファイルの読み込みの処理をスクラッチするより明らかに楽だし処理速度も速いと思うが
例えば4列のCSVをSJIS(Windows-J31)でデコードしてカンマ区切りで読み込んでSheet1のA1セルから書き出すとしたらこんな感じ
Sub ReadCSV()
With Worksheets("Sheet1")
With .QueryTables.Add(Connection:="TEXT;ソースファイルのパス", Destination:=.Range("A1"))
.TextFilePlatform = 932
.TextFileCommaDelimiter = True
.RefreshStyle = xlOverwriteCells
.TextFileColumnDataTypes = Array(xlTextFormat, xlTextFormat, xlTextFormat, xlTextFormat)
.Refresh
.Delete
End With
End With
End Sub