SheetToPrinter not working for certain excel file


When using the Worksheet.SheetToPrinter method with an excel file, it throws an object reference exception.

The sample code is below with the excel file attached:

var workbook = new Workbook();

workbook.Open("SheetToPrinter.xls", FileFormatType.Default);

var worksheet = workbook.Worksheets[0];




Hi Michael,

Thank you for considering Aspose.

Well, I tested your scenario and I am able to print the sheet without any problem. Which version of Aspose.Cells for .NET are you using? You may try the attached latest version of Aspose.Cells.

Thank You & Best Regards,

We were using version Using the latest version it now works.