I have an application created on an AS400 which generates output as a Comma Delimited CSV file, which is then run through an Excel worksheet which pulls out various elements of the CSV file. The CSV file can contain over 250,000 records which makes it difficult to import the file directly, so I use this function in Excel:
The problem is with the line
, some of the data elements may contain commas inside strings and this line interprets that as a data element to be split which means that the data is then misplaced.
Is there any VBA command available (or function) which could correctly parse a long string of text from a CSV input and ignore commas inside strings.
To further complicate matters, numeric data which is interspersed within the data entry is simply separated by commas where as String as surrounded by quotation marks.
The only solution I have so far is to manually modify the CSV file using Wordpad. Took me 4 hours to do this so any help appreciated.
Bookmarks