Convert XLS or XLSX file to PDF
Updated Tue, 29 Jul 2014 18:47:02 +0000

View License

Convert a xls or xlsx specific sheet to pdf file.
You must specify the full path for both files.
It requires MS Office 2007 or above installed, with capacity for saving to PDF and XPS.

xlsFile = 'C:\excelsps.xlsx';
sheet = 1; % Sheet name is also valid
pdfFile = 'C:\pdfdoc.pdf';

Tested on Win8 (64 bits) with Office 2010 and Matlab R2012b.

Cite As

Daniel Pereira (2024). xls2pdf.m (https://www.mathworks.com/matlabcentral/fileexchange/47309-xls2pdf-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Added comments and two outputs indicating the successful completion of the process.