I am using the following code:
hExcel = actxserver('Excel.Application');hWorkbook = hExcel.Workbooks.Open(sprintf('%s','C:\test.xlsx'));hWorksheet = hWorkbook.Sheets.Item(1);hRange = hWorksheet.Range('A1:O10');hRange.ExportAsFixedFormat('xlTypePDF','test_out.pdf');
The Excel ActiveX server allows me to do the usual stuff, but the last line doesn't do anything. Neither does it throw any error.
Does anyone know how to do this?
Best Answer