Problems converted comma seperated CVS file!

  • Thread starter Thread starter Lars Grøtteland
  • Start date Start date
L

Lars Grøtteland

Hello!

I have one comma seperated CVS file. I would like excel to import the file -
which work fine, but.....

Excel has a limit of 256 columns. If the comma seperated file has more than
256 items in it - the above 256 is truncated(deleted).

How can I import this CVS file and paste it in like Transpose? Does anyone
know?
 
This is a brute force solution: note the comments. Replace the file name with your file name

Sub TransposeCSV(
' Source file MUS
' 1. have between 1 and 255 row
' 2. the same number of delimiters (,) on each ro
col =
Close #
Open "c:\aa.csv" For Input As #
While Not EOF(1
Line Input #1,
a = Split(q, ","
b = Application.WorksheetFunction.Transpose(a
For i = LBound(b) To UBound(b
ActiveSheet.Cells(i, col) = b(i, 1
Next
col = col +
Wen
Close #
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top