Skip to main content
17-Peridot
July 16, 2021
Solved

download csv file

  • July 16, 2021
  • 1 reply
  • 1937 views

var params1 = {
infoTableName : "InfoTable",
dataShapeName : "EntityReference"
};

var AllEntities = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params1);

AllEntities =Projects["XXXXXX"].GetEntities();


var params2 = {
path: undefined /* STRING */,
data: AllEntities /* INFOTABLE */,
fileRepository: CustomServices /* THINGNAME */,
withHeader: undefined /* BOOLEAN */
};

Resources["CSVParserFunctions"].WriteCSVFile(params2);

 


This code is not working. I have provided ThingName for fileRepository. What else should i provide for fileRepository??

 

 

Best answer by slangley

Hi @AP_9587236 

 

Without knowing which extension you're using, here's a link to the ThingWorx Help Center on the extension that used to be available on the download site.

 

A CSV file is nothing more than a text file with a delimiter between fields, so you will be able to read it in any text editor.  You can import it into Excel or other software packages for changing the format.

 

Regards.

 

--Sharon  

1 reply

22-Sapphire I
July 16, 2021

I think on the repository itself there is a WriteCSV or Text service, perhaps try that one instead.

17-Peridot
July 16, 2021

You mentioning WriteToTextFile service in CSVDataFileRepository??

 

I need to download a infotable datas in csv or excel file!! Guide me.

Support
July 23, 2021

Hi @AP_9587236.

 

You can use the CSV Parser extension maintained and supported by our partner IQNOX.

 

Regards.

 

--Sharon