VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

CSV Parser

Files/File Controls/Input/Output   Visual Basic 3.0   Beginner   Wed 3rd February 2021

' This function is for use when parsing(splitting) a data string that
' has a comma delimiter. The normal VB Split function does not take into
' consideration of a comma embedded within a Fields' data string and
' will parse the information incorrectly.
'
' This function takes into consideration the a data field may contain
' a comma and parses the data as entire string. The data string being defined
' as the data between the two Double-Quote marks. This function also
' prunes the leading and trailing double quote marks

Inputs
Data String to Parse.

Assumes
This should be able to run under VB 5.0.

Returns
' Returns : Single-Dimension array, same result that you get ' from the SPLIT Function.

Side Effects
' Notes : Does NOT Correct improperly formatted Numeric amounts that ' : contain a comma for the thousands placement, unless the number has ' : leading and trailing Double-Quote marks.

Rate CSV Parser (5(5 Vote))
CSV Parser.bas

CSV Parser Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters