Sample code for 30+ languages & platforms
Visual FoxPro

CSV Enable Quotes

Explains the EnableQuotes property for the CSV class.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loCsv
LOCAL loCsv2

lnSuccess = 0

* The CSV in this example contains this:   test;"123;abc";xyz

loCsv = CreateObject('Chilkat.Csv')

* EnableQuotes is 1 by default, but we'll explicitly set to 1 here:
loCsv.EnableQuotes = 1
lnSuccess = loCsv.LoadFile("qa_data/csv/enableQuotes.csv")

* Show row 0, column 0
? loCsv.GetCell(0,0)
* Show row 0, column 1
? loCsv.GetCell(0,1)
* Show row 0, column 2
? loCsv.GetCell(0,2)

* Output is: 
*  test
*  123;abc
*  xyz

* -------------------------------------------
* Turn off EnableQuotes and see what happens:

loCsv2 = CreateObject('Chilkat.Csv')
loCsv2.EnableQuotes = 0

lnSuccess = loCsv2.LoadFile("qa_data/csv/enableQuotes.csv")

? loCsv2.GetCell(0,0)
? loCsv2.GetCell(0,1)
? loCsv2.GetCell(0,2)
? loCsv2.GetCell(0,3)

* Output is:

*  test
*  "123
*  abc"
*  xyz

RELEASE loCsv
RELEASE loCsv2