README.md
December 4, 2022 ยท View on GitHub
Description
This function takes a comma separated string and parses the values into a variable-length array, which can then be assigned to a predefined number of variables, or iterated with a For-Next loop. This code is roughly based on Brant Gluth's submission entitled "Parse Delimited Text", with the addition of a demo form and improved string handling. Most noticeably, this code can handle strings enclosed in quotes and will not break on delimiter characters within the quotes.
More Info
strSource - string containing CSV text.
strDelimiter - optional string value representing the delimiter, default is a comma.
strQuote - optional string value representing the quotation mark character, default is ".
All you need to implement this code in your own program is the module "readcsv.bas".
variable-length variant array containing each field from the CSV line.
None. Does not crash when given an empty string or improperly formatted text.
| Submitted On | 2003-04-25 09:56:20 |
| By | Mike Baldwin |
| Level | Intermediate |
| User Rating | 4.8 (19 globes from 4 users) |
| Compatibility | VB 6.0 |
| Category | String Manipulation |
| World | Visual Basic |
| Archive File | CSV_string1579344252003.zip |