Printing a excel file from background

Hi,

I would like a help to a little problem in my application.

When the user press the button "Print", the application must search a excel file, in the system folder and print the file. But the event must send the excel file direct to the printer, and it must NOT open. The user must not see or interact with the file.

There is anyway to load and print the excel file without showing it openly in the screen ?


1 Reply

YG Yavanaarasi G Syncfusion Team July 4, 2008 08:54 AM UTC

Hi Daniel,

Essential XlsIO don't have direct support for printing documents.If MS Excel is present on the system, you can launch the process and print the spreadsheet using the below code snippet:


[C#]
//Print an Excel document

System.Diagnostics.Process pr = new System.Diagnostics.Process();

pr.StartInfo.Verb = "Print";

pr.StartInfo.FileName = "Sample.xls";

pr.Start();


Please try this and let me know if this helps.

Regards,
G.Yavana



Loader.
Up arrow icon