saving excel as pdf
10 次查看(过去 30 天)
显示 更早的评论
Hi I was using the following lines to save my excel file to pdf for landscape orientation. I can save the file as pdf but the printed pdf is not in landscape setting. Any suggestion is appreciated. Could anyone please take a look how i could it set for landscape orientation. Thank you very much:
hExcel = actxserver('Excel.Application'); hWorkbook = hExcel.Workbooks.Open(sprintf('%s','C:\Users\Mohammad\Desktop\test.xls')); hWorksheet = hWorkbook.Sheets.Item(1);
hWorksheet.PageSetup.Orientation = 1; hWorkbook.ExportAsFixedFormat('xlTypePDF','C:\Users\Mohammad\Desktop\test.pdf');
Rafiq
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!