Share via

[SOLVED] - Not able to open CSV?

Anonymous
2014-06-08T12:18:27+00:00

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

Microsoft 365 and Office | Excel | For home | Windows

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.

0 comments No comments

17 answers

Sort by: Most helpful
  1. Anonymous
    2014-06-08T13:48:32+00:00

    Hi,

    Looking to your file ...

    4.12,"中信證券",600030    ,XSHG,6579355     ,14.19,3560934,156563019,2271881439.47,"金融界"

    I don't know, sorry

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-06-08T13:13:28+00:00

    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

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2014-06-08T13:12:03+00:00

    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 :>

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-06-08T13:03:43+00:00

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2014-06-08T12:50:12+00:00

    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.

    Was this answer helpful?

    0 comments No comments