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

Free Support Forum - aspose.com

SheetToPrinter not working for certain excel file

Hello,

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];

worksheet.SheetToPrinter("printername");

Thanks,

Michael

Hi Michael,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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 4.6.0.8. Using the latest version it now works.

Thanks!