Split excel sheet to multiple pdf

I wish to convert excel file contain only one sheet to pdf.

And i tried to filter cell in that excel to appear in pdf as:

Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(inputFilePath);
foreach (Aspose.Cells.Worksheet sheet in workbook.Worksheets)
{
sheet.PageSetup.PrintArea = string.Format(“A1:D4”);
}
workbook.Save(outputFilePath, Aspose.Cells.SaveFormat.Pdf);

By using above code, in pdf appear only A1 to D4 cells.

My requirement is that, i need to write remaining cells(other than A1 to D4) to next pages of current pdf.How can i do this?

Hi,


Aspose.Cells renders PDF file format based on what is shown in Print Preview of Worksheets in MS Excel, so when you set the printable area i.e. “A1:D4”, surely it will display the range (A1:D4) only when taking the print preview (you may confirm this in MS Excel manually) of the sheet.

For your specific requirements, you got to add/ insert horizontal and vertical page breaks in the sheet accordingly before rendering to PDF. For example, you may insert a horizontal page break @ specific cell/ row, i.e…, “A5”, also you may insert vertical page break @ cell/ column i.e…, E column. Please see the document for your complete reference on how to add page breaks in the worksheets for your reference:
http://www.aspose.com/docs/display/cellsnet/Managing+Page+Breaks

Thank you.