cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Service to read excel file, manipulate data and write to SQL database

herveDelhalle
5-Regular Member

Service to read excel file, manipulate data and write to SQL database

Hello, 

 

I would like to read excel file content in order to manipulate data and then write modified data to SQL Server. 

Unfortunately, I am not able to read excel file using javascript in Thingworx.

I have tried to find answers in the community but the answers I rode do not help me so much ... 

Could you please help me to do it ? 

 

Best regards 

 

Hervé 

1 ACCEPTED SOLUTION

Accepted Solutions

@herveDelhalle ,

 

I don't believe ThingWorx has any resources to parse Excel files.  They can be a bit complicated since they don't only store data.  They can have multiple sheets, formulas, macros, etc. associated with them.  That said, however, there are solutions for bulk conversion that can take your excel data and do a save-as as CSV.  

View solution in original post

5 REPLIES 5

If you save the Excel file as a CSV, you can parse it into ThingWorx using the CSV parser extension.  Look for it here:

 

https://support.ptc.com/appserver/auth/it/esd/product.jsp?prodFamily=TWX

 

You can parse it right into a data-shape and do whatever manipulation/inserts you'd like

herveDelhalle
5-Regular Member
(To:nmilleson)

Dear nmileson, 

 

Thank you for your reply. Is there a way to convert excel file to csv file using javascript services ? 

 

In industrial, excel files are a very common data format. Consequently, I consider that Thingworx should be able to process this data source whithout modifying the source format. 

 

Best regards 

 

Hervé 

@herveDelhalle ,

 

I don't believe ThingWorx has any resources to parse Excel files.  They can be a bit complicated since they don't only store data.  They can have multiple sheets, formulas, macros, etc. associated with them.  That said, however, there are solutions for bulk conversion that can take your excel data and do a save-as as CSV.  

@herveDelhalle  Whatever milleson  mentioned above is correct, you can achieve it using csv functions. As there is no way to parse or convert excel files in Thingworx. You have to open and save excel files in csv format and import it to Thingworx.  Use read/parse csv file service which will give output in infotable format, then insert those entries into respective database.

 

 

Hi @herveDelhalle.

 

If one of the previous posts allowed you to find a solution, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Thank you for your participation in our community.

 

Regards.

 

--Sharon

Top Tags