Hello everyone I have currently developed a windows service which gets installed on a server machine and watches a particular folder. When a .csv file is added to the folder it grabs that file, reads it and the creates Excel file for each of the records found inside .csv file. As this is OpenXML document (Excel file) i can easily create it without having office installed on the server machine. What I want to do now is to send those generated excel files to the printer which is attached to the server machine without opening them. I know it might be impossible, but are there any chances to print those files without installing office or maybe OpenXML SDK can help? I am really stacked on this as there is no chance to install anything on server except the windows service which I developed.
Asked
Active
Viewed 1,675 times
2 Answers
1
You're looking for Process.Start
, setting the Verb
on the ProcessStartInfo
you pass in.
As long as there's an app registered as handler for the verb "Print", then the item should print.

Community
- 1
- 1

John Gardner
- 24,225
- 5
- 58
- 76
-
As i already mentioned below, using Process.start for 50 even 35 files does not seem to be best solution. are there any alternatives? – Rati_Ge May 31 '12 at 20:58
0
To play music at home, you inevitably need an instrument. That's a logical rule. Not only office, but any other special document format won't work until at least you install their distributed libraries. Therefore I think there is no way to achieve this without installing extra stuff on your server.

Saeed Neamati
- 35,341
- 41
- 136
- 188
-
I understand your point, but could u specify what to include? maybe including only .dll files will be okay? what I mean by limitations of installing anything is that I can not run any installer. the other problem here is that If I use process start with parameters and verb print, is not this bad solution if I am printing 30 files in batch? – Rati_Ge May 31 '12 at 20:57
-
Maybe a good starting point is [here](http://msdn.microsoft.com/en-us/library/kh3965hw.aspx). – Saeed Neamati May 31 '12 at 21:06
-
Ok it sounds reasonable but now I am looking at Aspose cells component which prints those office documents without an MS products installed – Rati_Ge May 31 '12 at 21:31