Skip to main content
vibhas7797
July 27, 2022
Question

Convert Excel to PDF

  • July 27, 2022
  • 10 replies
  • 0 views

I need to convert an excel document to the PDF, does anyone know how to do that ? Thanks in advance. 

10 replies

harshitb6843
July 27, 2022

I am not sure if there is a direct way of achieving it as this topic has been hanging around for quite a long time, but there is a workaround for it. 
You can generate your excel on Appian and then use a third-party service like https://pspdfkit.com/api/excel-to-pdf-api/ to convert your excel to PDF outside Appian. 

There are a lot of other third-party services as well that you can choose from depending on the business data sensitivity.


Harshit Bumb

vibhas7797
July 27, 2022

Mentioned API is not working as expected, few columns and text doesn't get fit to the PDF pages.

harshitb6843
July 27, 2022

You can search for more third-party services like this but the idea was to do it outside Appian. 

csteward
July 27, 2022

Are you generating the document yourself?  E.g., for scenarios such as when the file is generated it from the data source, you could look to generate it as an HTML dynamically instead and utilize the PDF from HTML service within the Dynamic Document Generator plugin.

Not sure if that will help your use case, just a thought.

vibhas7797
July 28, 2022

Unfortunately not, user is uploading N number of documents with different extensions, and we would have to convert all of the into the PDF.

sangeethab0005
July 29, 2022

@vibhas7797 

1. Read excel using readexcelsheetpaging function. this will return headers and data separately.

2. Create an html template , pass headers and data as input and generate an html document using "HTML Doc from Template" smartservice. 

3. Pass this html doc to "HTML to Pdf" smart service.

March 14, 2023

HI Sangeetha, is it working?

sangeethab0005
March 20, 2023

yes

mikes0011
Brainy
July 29, 2022

During the 22.3 webinar yesterday they mentioned a newer plug-in called PDFTron.  The exciting thing with this is that it can display MS Office formats (word, excel, etc) on-form, and save PDF copies of them for you.  Note the plug-in is paid, but a free version works (the generated document gets a "PDF Tron" watermark if you use the free version).