A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
Looking to your file ...
4.12,"中信證券",600030 ,XSHG,6579355 ,14.19,3560934,156563019,2271881439.47,"金融界"
I don't know, sorry
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I would like to open following linked CSV file, but find out this file containing data over 65536 row, so I cannot not able to open it.
Does anyone have any suggestions on how to solve this issue?
Thanks in advance for any suggestions
Linked file:
http://hk.ishares.com/product\_info/fund/excel\_holdings.htm?periodCd=d&ticker=2823
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Hi,
Looking to your file ...
4.12,"中信證券",600030 ,XSHG,6579355 ,14.19,3560934,156563019,2271881439.47,"金融界"
I don't know, sorry
When I try this macro, it fails on processing the CSV file.
Does anyone have any suggestions?
Thanks, to everyone very much for any suggestions :>
modImportBigFiles.bas
Would it be possible to open CSV file instead of text file?
Does anyone have any suggestions?
Thanks, to everyone very much for any suggestions :>
Followwing code from MS may be helpful
Sub LargeFileImport()
'Dimension Variables
Dim ResultStr As String
Dim FileName As String
Dim FileNum As Integer
Dim Counter As Double
'Ask User for File's Name
FileName = InputBox("Please enter the Text File's name, e.g. test.txt")
'Check for no entry
If FileName = "" Then End
'Get Next Available File Handle Number
FileNum = FreeFile()
'Open Text File For Input
Open FileName For Input As #FileNum
'Turn Screen Updating Off
Application.ScreenUpdating = False
'Create A New WorkBook With One Worksheet In It
Workbooks.Add template:=xlWorksheet
'Set The Counter to 1
Counter = 1
'Loop Until the End Of File Is Reached
Do While Seek(FileNum) <= LOF(FileNum)
'Display Importing Row Number On Status Bar
Application.StatusBar = "Importing Row " & _
Counter & " of text file " & FileName
'Store One Line Of Text From File To Variable
Line Input #FileNum, ResultStr
'Store Variable Data Into Active Cell
If Left(ResultStr, 1) = "=" Then
ActiveCell.Value = "'" & ResultStr
Else
ActiveCell.Value = ResultStr
End If
'For Excel versions before Excel 97, change 65536 to 16384
If ActiveCell.Row = 65536 Then
'If On The Last Row Then Add A New Sheet
ActiveWorkbook.Sheets.Add
Else
'If Not The Last Row Then Go One Cell Down
ActiveCell.Offset(1, 0).Select
End If
'Increment the Counter By 1
Counter = Counter + 1
'Start Again At Top Of 'Do While' Statement
Loop
'Close The Open Text File
Close
'Remove Message From Status Bar
Application.StatusBar = False
End Sub
Note The macro does not parse the data into columns. After using the macro, you may also need to use the Text To Columnscommand on the Data menu to parse the data as needed.