saving excel as pdf

10 次查看(过去 30 天)
Mohammad
Mohammad 2014-1-23
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 个)

Community Treasure Hunt

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

Start Hunting!

Translated by