![]() |
Problems converted comma seperated CVS file!
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? -- - Lars |
Problems converted comma seperated CVS file!
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 |
All times are GMT +1. The time now is 05:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com