Skip to main content

Open-CSV-File

Command Description

Open CSV file, and return a data table object

Command Prototype

arrayRet = CSV.Open(sPath,optionArgs)

Parameter Description

ParameterRequiredTypeDefaultDescription
sPathTruepath'''C:\Users'''The path to the CSV file to open
encodingNoneenum"auto"File character set encoding

return

arrayRet,The variable used to save the output of the command.

Demo

/************************************Open CSV file************ ************************ 
Command prototype:
arrayRet = CSV.Open('''C:\Users''',{"encoding":"auto"})
Input parameters:
sPath--path to the CSV file to open
encoding--file character set encoding (optional)
Outgoing parameters:
arrayRet--The result after the command is run
********************************************************************************/
Dim sPath = '''C:\Users\Chance\Desktop\testData.csv'''
arrayRet = CSV.Open(sPath,{"encoding":"auto"})
TracePrint(arrayRet)