Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Jun 13, 2014 7:11 pm

Does the latest version of Spire.XLS allow you to print the XLS worksheet? I have a need to open an XLS document, modify some data in cells, then print it to the default printer.

Thank you,
Chris

cxk159
 
Posts: 1
Joined: Tue Apr 29, 2014 6:16 pm

Mon Jun 16, 2014 2:54 am

Hello Chris,

Sorry for late reply as weekend.
Thanks for your inquiry. Sorry that currently Spire.XLS doesn't support print feature. And we have added to our schedule, once it is supported, we will let you know immediately.
If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Jul 08, 2014 9:11 am

Hello,

The feature has been added, and the newest hotfix has been released, please download the Spire.XLS Pack Hotfix Version:7.5.3 and test the following method.
Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(inputFile);
PrintDialog dialog = new PrintDialog();
dialog.AllowPrintToFile = true;
dialog.AllowCurrentPage = true;
dialog.AllowSomePages = true;
dialog.AllowSelection = true;
dialog.UseEXDialog = true;
dialog.PrinterSettings.Duplex = Duplex.Simplex;
dialog.PrinterSettings.FromPage =0;
dialog.PrinterSettings.ToPage = 8;
dialog.PrinterSettings.PrintRange = PrintRange.SomePages;
workbook.PrintDialog = dialog;
PrintDocument pd = workbook.PrintDocument;
if (dialog.ShowDialog() == DialogResult.OK)
{
pd.Print();
}

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.XLS