Hi,
Hi Willem-Jan,
Thanks for your posting and using Aspose.Cells for .NET.
You have actually set the print area with this line.
ws.PageSetup.PrintArea = “A1:B1”;
If you remove this line, it will print the entire worksheet in xps. Please note, Aspose.Cells print the same way as it is shown in the Excel Print Preview.
Please comment the above line to resolve your issue.
Thanks for the fast reply.
Hi Willem-Jan,
Thanks for your posting and using Aspose.Cells.
Your finding is correct. There is no way to print the entire area without clearing the print area first. So you must clear it to make sure the entire contents of worksheet print on the image. I have tested it with your sample file.
OnlyArea is false by default so setting it false does not have any effect. You can add this line to make sure that printing area is set to empty before taking the image of worksheet.
ws.PageSetup.PrintArea = “”;