Excel Workbook creation using C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm creating an excel workbook using c#. At this line of code I get an error:

excelWorksheet.PageSetup.pLeftHeader = "Name \n" + "Record# \n" + "ID# \n" +
"Date \n" + "Range \n";

The error I get is:

"No printers are installed. To install a printer, point to Settings on the
Windows Start menu, click Printers, and then double-click Add Printer. Follow
the instructions in the wizard."

I've checked to see whether I have a printer installed and I do. Can someone
please help me?


Thanks
Prisy
 
Prisy said:
I'm creating an excel workbook using c#. At this line of code I get an
error:

excelWorksheet.PageSetup.pLeftHeader = "Name \n" + "Record# \n" + "ID# \n"
+
"Date \n" + "Range \n";

The error I get is:

"No printers are installed. To install a printer, point to Settings on the
Windows Start menu, click Printers, and then double-click Add Printer.
Follow
the instructions in the wizard."

I've checked to see whether I have a printer installed and I do. Can
someone
please help me?


Thanks
Prisy

Is this a windows or console application, or is it a Service style
application? (Windows Service, Web application).
If it's the latter, then this behavior is by design, if it's the former
(less likely), one possible reason could be impersonation of a non
interactive account.

Willy.
 
This is a web application. Why do you say it is by design? Do you know of any
Microsoft KnowledgeBase articles that mention this? What is a non interactive
account? How can it be impersonated? Please explain.

Another wierd thing about this is that even tho' this does not work on my
machine, when I use Remote Desktop Connection from another machine and
connect to my machine and then run it, it does not display this error but
runs smoothly? Why would that happen?
 
Back
Top