Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) CSV Enable QuotesExplains the EnableQuotes property for the CSV class.
Use ChilkatAx-win32.pkg Procedure Test Handle hoCsv Boolean iSuccess Handle hoCsv2 String sTemp1 // The CSV in this example contains this: test;"123;abc";xyz Get Create (RefClass(cComChilkatCsv)) To hoCsv If (Not(IsComObjectCreated(hoCsv))) Begin Send CreateComObject of hoCsv End // EnableQuotes is True by default, but we'll explicitly set to True here: Set ComEnableQuotes Of hoCsv To True Get ComLoadFile Of hoCsv "qa_data/csv/enableQuotes.csv" To iSuccess // Show row 0, column 0 Get ComGetCell Of hoCsv 0 0 To sTemp1 Showln sTemp1 // Show row 0, column 1 Get ComGetCell Of hoCsv 0 1 To sTemp1 Showln sTemp1 // Show row 0, column 2 Get ComGetCell Of hoCsv 0 2 To sTemp1 Showln sTemp1 // Output is: // test // 123;abc // xyz // ------------------------------------------- // Turn off EnableQuotes and see what happens: Get Create (RefClass(cComChilkatCsv)) To hoCsv2 If (Not(IsComObjectCreated(hoCsv2))) Begin Send CreateComObject of hoCsv2 End Set ComEnableQuotes Of hoCsv2 To False Get ComLoadFile Of hoCsv2 "qa_data/csv/enableQuotes.csv" To iSuccess Get ComGetCell Of hoCsv2 0 0 To sTemp1 Showln sTemp1 Get ComGetCell Of hoCsv2 0 1 To sTemp1 Showln sTemp1 Get ComGetCell Of hoCsv2 0 2 To sTemp1 Showln sTemp1 Get ComGetCell Of hoCsv2 0 3 To sTemp1 Showln sTemp1 // Output is: // test // "123 // abc" // xyz End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.