We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Worksheet.PageSetup.PrintArea is null ... even though set in Excel?

Hello there,



quick Question: I’ve set a PrintArea in Excel for a .xls file, but when opening the same .xls with Aspose.Cells, select the proper sheet and check for the Worksheet.PageSetup.PrintArea Property… it’s always null. Why’s that?



Using the 4.5 Version…



Best regards,

-Joerg Battermann

Hi,

Could you try the attached version (4.5.0.28). I tested with it and it works fine. I used a template excel file in which I have set the print area manually i.e.., Using menu option File|Page Setup| and in the dialog box select the Sheet tab and specify the Print area e.g.., A1:H40. I used the following sample code:

Sample code:

Workbook workbook = new Workbook();
workbook.Open(@"f:\test\050690CL_sheetn.xls");
Worksheet ws = workbook.Worksheets[0];
MessageBox.Show(ws.PageSetup.PrintArea.ToString()); //It shows A1:H40.... OK!

Thank you.