txtChangeCharacterIgnoreWithinQuotes

Description: Change any single character to any other single character, comma delimiter included, but will ignore instances of the search character that are inside quotation marks.

Parameters:

txtChangeCharacterIgnoreWithinQuotes(sInputFile As String, sOutputFile As String, sChar As String, sCharReplace As String) As Long

Parameter

Meaning

sPathOriginal

CSV file to modify

sPathTarget

Can be the same as sPathOriginal, otherwise a file is created with the original and newly moved sheets.

sChar

Character to swap out; searches for this character

sCharReplace

Character to replace sChar

Return Values:

     0: Success 

-2: "Unable to open or save to target file. Could be a sharing violation, or invalid file type: (") + co.sTargetFile + ")"

-3: "Unable to open original file. Check file format. Could be a sharing violation: (") + co.sOriginalFile + ")"

-201: "Shareware has expired"

Note:
XLSConverterX checks for pairs of quotation marks, line by line. If data input has an opening quote without a closing quote, output for that line may not be as expected.