Skip to main content
16-Pearl
August 1, 2025
Solved

How to Automate an Excel-Based Form with PDF Generation in ThingWorx?

  • August 1, 2025
  • 4 replies
  • 8024 views

Hello Community,

I’m currently got a new  use case where we have an existing Excel form that includes multiple text fields and checkboxes. The goal is to digitally fill out this form and then generate a PDF from it — all within a ThingWorx-based environment.

Here’s the idea I’m considering:

  • Convert the Excel structure into an HTML representation (including form fields and styling).

  • Open this HTML form dynamically in the browser via ThingWorx.

  • Allow users to fill in the fields (text, checkboxes, etc.).

  • Finally, generate and save the completed form as a PDF.

My question is:
Is this workflow achievable directly in ThingWorx?
Has anyone implemented something similar using ThingWorx + HTML + PDF generation?
 What are the best practices  I can consider for this?

 

Note: We have around 80 plus excel files of customer which they normally fill out and save as pdf. I cannot make it static checklist in vuforia studio because there can be in the future 100 plus excels which needs to be automate. So basically its just digitalization of checklist which needs to be filled and saved as pdf thats it. 

 

Any input, examples, or suggestions would be greatly appreciated!

Thanks in advance,

In my this post of mine , i was successfully able to open HTML in browser from thingworx
https://community.ptc.com/t5/ThingWorx-Developers/Generate-a-Pre-Filled-HTML-Template-in-Browser-for-PDF-Export-Is/m-p/1018231#M69880

Best answer by Constantine

Hello @MA8731174,

 

I would look in a different direction if I were you. I'd rather hack something like this:

 

  1. When the user needs to fill in a form, copy the corresponding template-123.xlsx in OneDrive using Microsoft Office APIs
  2. Share this file, so that anyone with a link can edit it. Get that link using another API.
  3. Open this link in a standalone browser tab, so that the user can fill in the actual Excel form in a web version of Office 365
  4. Let them click some button in ThingWorx UI (e.g. "Complete") once they filled it and closed that Office tab
  5. Call another Office 365 API to generate a PDF out of an XSLT, download that PDF

In other words, I would delegate to MS Office for all that Excel filling and PDF generation. This all assumes that all of that is exposed via REST APIs, and it is easy to use it, which is a very big assumption. It probably isn't easy at all.

 

/ Constantine

4 replies

18-Opal
August 1, 2025

Hello @MA8731174,

 

I would look in a different direction if I were you. I'd rather hack something like this:

 

  1. When the user needs to fill in a form, copy the corresponding template-123.xlsx in OneDrive using Microsoft Office APIs
  2. Share this file, so that anyone with a link can edit it. Get that link using another API.
  3. Open this link in a standalone browser tab, so that the user can fill in the actual Excel form in a web version of Office 365
  4. Let them click some button in ThingWorx UI (e.g. "Complete") once they filled it and closed that Office tab
  5. Call another Office 365 API to generate a PDF out of an XSLT, download that PDF

In other words, I would delegate to MS Office for all that Excel filling and PDF generation. This all assumes that all of that is exposed via REST APIs, and it is easy to use it, which is a very big assumption. It probably isn't easy at all.

 

/ Constantine

18-Opal
August 4, 2025

Out of curiosity I did a quick check, and it seems like all those REST APIs are indeed available:

/ Constantine

18-Opal
August 1, 2025

Another wild idea -- ThingWorx mashups are just JSONs, which you can generate yourself, if you want to. You might be able to create some script (e.g. an Excel macro) that would convert your spreadsheet into a mashup for you. This assumes you know how to program Office macros well.

Rocko
19-Tanzanite
August 4, 2025

Just an idea, if you have Analytics installed, you might want to look into the Analytics Manager which comes with an Excel Connector. This could get you the Excel populated and computed, but for the last step - is rendering an Excel as a PDF really something you want your IIOT platform to perform? 

https://support.ptc.com/help/thingworx/analytics/r10/en/#page/analytics/analysis_services/AnalysisServices_WorkingWithProviders.html#

 

Community Moderator
August 8, 2025

Hello @MA8731174,

 

It looks like you have some responses from some community members. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 
Or if you were able to figure out the issue, please help to document it and mark the reply as your accepted solution. This will surely help other community members who may have a similar question.


Thanks,
Vivek N.
Community Moderation Team.