格雷柏語翻譯 Line Input #FileNum翻譯社 ResultStr
'Display Importing Row Number On Status Bar
'ActiveCell(1, 2).Value = Mid(ResultStr, 4, 8) '第二欄
If ActiveCell.Row = 1048576 Then
If FileName = "" Then End
Dim ResultStr As String
Counter = Counter + 1
'Close The Open Text File
Application.StatusBar = False
之前遇過相同問題的裝備記載檔
人人好,由於小弟比來...(恕刪)
大師好,由於小弟比來...(恕刪)
第二步則是設定每個工作表要貯存多少筆資料,再用資料筆數去除,以得知需要產生幾個工作表
Dear kltwn worte:

kltwn wrote:
換用資料庫來做如access
天成翻譯公司不是超市員工=.=

再做恰當的修改就能夠了
只是資料量真的太大,跑完要三小時= =+翻譯社今朝也正在試著用access

'Ask User for File's Name
'If Not The Last Row Then Go One Cell Down
Counter = 1
'ActiveCell(1, 3).Value = Mid(ResultStr, 9, 11) '第三欄
'ActiveCell(1, 3).Value = Mid(ResultStr, 9, 11) '第三欄
'If On The Last Row Then Add A New Sheet
'ActiveCell(1, 2).Value = Mid(ResultStr, 4, 8) '第二欄
FileNum = FreeFile()
ActiveCell.Offset(1翻譯社 0).Select
感謝大家
你的原始檔案應該CSV檔



換用資料庫來做如ac...(恕刪)


所以,如果是我要寫VBA,可能會分這幾個步調去向理
於是小弟想到一種解決體式格局,流程是:
人人好,由於小弟比來在處置一份檔案,該檔案資料量相當大
'Increment the Counter By 1
'Open Text File For Input
'Set The Counter to 1
'Store One Line Of Text From File To Variable
'Store Variable Data Into Active Cell
'請依現實需求批改
Dim FileName As String
'Start Again At Top Of 'Do While' Statement


你的需求已是需要access或更高級資料庫啦 很少人選擇硬塞excel 泛泛這種狀態我也選擇放棄直接用excel整頓原始資料

慘了~~~


那只是看到桌上衛生紙想到的暱稱....
翻譯公司更清楚的建議囉
Try try 這個工具

Sub LargeFileImport()
'Check for no entry
ActiveWorkbook.Sheets.Add
Open FileName For Input As #FileNum
Application.ScreenUpdating = False
'Workbooks.Add template:=xlWorksheet
Do While Seek(FileNum) <= LOF(FileNum)
'Loop Until the End Of File Is Reached
'Create A New WorkBook With One Worksheet In It
ActiveCell(1翻譯社 1).Value = ResultStr '第一欄
Application.StatusBar = "Importing Row " & _
'修改以下
Dim Counter As Double
Loop
有最笨的方式可以用
1.匯入檔案後

2.超過欄位上限的資料主動置於第二個工作表

3.若第二個工作表也放不下,再往第三個工作表放…

4.依此類推直到檔案全數匯入終了


頂好Wellcome wrote:
今天有去書局翻了一下vba的書,還是沒有我要的謎底..





欄位會跨越Excel 2007的欄位上限1048576
'Dimension Variables
FileName = InputBox("Please enter the Text File's name, e.g. test.txt")
End Sub