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

Free Support Forum - aspose.com

Behaviour of the WorkBook.Save() method

i'm using the following code to convert Excel document into PDF.

 
  Aspose.Cells.Workbook document = new Aspose.Cells.Workbook(inputStream);            

document.Save(outputStream, Aspose.Cells.SaveFormat.Pdf);

1>If the work book has print area already set, the save operation creates PDF only

for that area? is that the default behaviour of the work book save() method?

2>Will this behaviour apply to all the workbooks inside the excel spreadsheet,

meaning if each workbook has print area already set then only that area gets

converted to PDF?

3>What should i do to override the print area setting so the whole book gets converted?

should i just set it to null??

Hi,

Thanks for your question and your interest in Aspose.Cells for .NET.

Actually, Aspose.Cells converts the workbook according to the Print Preview of Ms-Excel. So your PDF should look similar to the Print Preview of Excel worksheets.


Hi,


"3>What should i do to override the print area setting so the whole book gets converted?
should i just set it to null??"

Yes, you should set the print area to null for each worksheet if you need to print all the contents of each worksheet in the book.

e.g

worksheet.PageSetup.PrintArea = null;