saving excel as pdf

11 visualizaciones (últimos 30 días)
Mohammad
Mohammad el 23 de En. de 2014
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

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by