Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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??
Solved! Go to Solution.
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
I think on the repository itself there is a WriteCSV or Text service, perhaps try that one instead.
You mentioning WriteToTextFile service in CSVDataFileRepository??
I need to download a infotable datas in csv or excel file!! Guide me.
Hi @AP_9587236.
You can use the CSV Parser extension maintained and supported by our partner IQNOX.
Regards.
--Sharon
1. Can you please tell me what added functionalities "CSVParser_extensions" will provide than "CSVParserFunctions". What is the use of "CSVParser_extensions"?
2. And i tried this code, and iam able to download the entities list as a file.
var params1 = {
infoTableName : "InfoTable",
dataShapeName : "EntityReference"
};
var AllEntities = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params1);
AllEntities =Projects["XXXXXX"].GetEntities();
var params2 = {
path: "/ALL_ENTITIES_FILE/" /* STRING */,
data: AllEntities /* INFOTABLE */,
fileRepository: "SystemRepository" /* THINGNAME */,
withHeader: undefined /* BOOLEAN */
};
Resources["CSVParserFunctions"].WriteCSVFile(params2);
3. The downloaded file is a notepad. But i want it in a table format. How to do that?
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