01-21-2026 03:51 AM
I need to generate a 2-page PDF report in LabVIEW using an Excel template.
Each page must have a different page size
Page 1 → A4
Page 2 → Letter
The report data comes from LabVIEW and is written into Excel.
The final output should be one single PDF file with two pages.
I am using 32-bit LabVIEW with 64-bit Excel.
ActiveX is not allowed / preferred.
I am looking for the recommended LabVIEW approach, best practices, or toolkits to implement this reliably.
01-21-2026 10:09 AM
On Windows, you must use ActiveX to write to Excel.
01-21-2026 12:58 PM
We've had endless troubles with Excel in LabVIEW, especially when trying to do anything very complicated. We also couldn't find a way other than ActiveX/COM to interact with it.
In the end we no longer attempt to save directly to Excel in any new code, and whenever we rev up old code we try to see if there's a way to remove it. Alternate options include:
01-21-2026 09:42 PM
My 2014 Revised "Generate Excel Report" Example will help you generate an Excel report using the Report Generation Toolkit which may or may not be present in your version of LabVIEW (it is, I believe, present in the Academic version of LabVIEW, possibly Community Edition, or as a separate licensed Toolkit).
That, of course, only gets it into Excel. Generating a two page Report where you change the paper size setting between Page 1 and Page 2 is a trick that I've not considered. I'm also not sure about the PDF formatting (I'm currently away from my Desktop machine with the code and example).
Bob Schor
01-22-2026 07:58 AM
01-22-2026 09:28 AM - edited 01-22-2026 09:29 AM
The XLR8 toolkit can read and write XLXS files without using ActiveX or needing Excel installed on the target machine.
Exaprom PDF or just using Windows built in "print to PDF" are two ways to make a PDF in LabVIEW