Application Requirement : To fetch excel or CSV file in thingworx as template, Update cells or rows in file and save with new name ( so that my template will be there for every next operation)
Current Status: I want to only update excel/CSV file but i am unable to find any solution for same,
I have tried CSV Parser function in thingworx to Read and write file but during write operation it completely overwrites previous data.
Please suggest solution for same.
I am using Thingworx 9.3.2
The CSVParser will be the best thing to use. I do not understand what your issue is with it. You may want to share code.
In theory you want to:
1. read the template .csv (ReadCSVFile)
2. Modify what you need to modify
3. Save modification with new filename(SaveCSVFile)
I have tried to use CSV parser , but by using that i can Read or write CSV files only and do not have option to update or modify file.
Read CSV file is working fine for me. I can see values of file in infotable output of service
While writing CSV file, complete file gets overwritten by data provided in infotable while writing CSV file.
Please find below Sample information to get more detailed view on requirement,
I want above mentioned file as Template, Where Headings should be similar for every file and Area highlighted in blue should get values from thingworx infotable.
So in above case I need to have control to update cells of files ,not the complete sheet which only follows infotable structure to write file.
Please let me know if you need more information in it.
Hi @G_U ,
I believe you need to clarify for us some points in order to be able to effectively help you:
If you are open to creating an Extension, you can use the libraries provided from the Apache Software Foundation, Apache POI library. This library will give you the ability to create, read and modify Excel file types as well as CSV.