We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

printing xls documents

Hi, is there any way to print an xls doc without starting the MS Excel?

I've created a document and now I want to print it out directly without starting Excel.


3 Replies

MW Melba Winshia Syncfusion Team July 4, 2007 11:21 AM UTC

Hi Vicko,

Essential XlsIO does not have support for printing documents. However this can be done using the Process class and specifying the verb as "Print". This is the equivalent of right clicking and selecting print in the windows shell. Please refer the following code snippet to achieve this:

[C#]

//Printing the spreadsheet that was created.
System.Diagnostics.Process pr = new System.Diagnostics.Process();
pr.StartInfo.Verb = "Print";
pr.StartInfo.FileName = "Sample.xls";
pr.Start();

Also, please refer the following link

http://www.syncfusion.com/faq/windowsforms/search/1146.aspx

Kindly let me know if you have any other questions.

Thanks,
Melba


MV Miran Vulic July 4, 2007 01:26 PM UTC

Is there any way to hide the process from the user comletly??
I use following pieco of code:
Process pr = new Process();
pr.StartInfo.Verb = "Print";
pr.StartInfo.FileName = "Document_name";
pr.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
pr.StartInfo.CreateNoWindow = true;
pr.Start();


AJ Ajish Syncfusion Team July 4, 2007 06:02 PM UTC

Hi Miran,

Thank you for your interest in Essential XlsIO.

Currently Essential XlsIO does not have any buildin support for printing files. Essential XlsIO can only be used to create/modify files from scratch in .NET applications. It does not have a printer driver that can print Excel files. Sorry for the inconvenience.

Kindly let us know if you have any other questions.
Have a Nice day.

Regards,
Ajish.

Loader.
Live Chat Icon For mobile
Up arrow icon