473,378 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Excel Workbook creation using C#

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
Nov 17 '05 #1
3 1647

"Prisy" <Pr***@discussions.microsoft.com> wrote in message
news:DB**********************************@microsof t.com...
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.

Nov 17 '05 #2
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?

--
Thanks in advance,
Prisy
"Willy Denoyette [MVP]" wrote:

"Prisy" <Pr***@discussions.microsoft.com> wrote in message
news:DB**********************************@microsof t.com...
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.

Nov 17 '05 #3

"Prisy" <Pr***@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
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.
Check this, it answers all of your questions.
http://support.microsoft.com/default...b;en-us;257757
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?

--
Thanks in advance,
Prisy
"Willy Denoyette [MVP]" wrote:

"Prisy" <Pr***@discussions.microsoft.com> wrote in message
news:DB**********************************@microsof t.com...
> 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.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: u7djo | last post by:
Hi, I'm currently building a function in Access that creates an Excel spreadsheet but it doesn't look like the Excel object is being destroyed correctly as the Excel module is still showing in the...
0
by: acharyaks | last post by:
Hi life saver, I am using excel component for the development. The purpose is to connect to excel through the odbc connection string. Then through the connection extract data into a dataset and...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
2
by: Praveen K | last post by:
I have a problem in communicating between the C# and the Excel Interop objects. The problem is something as described below. I use Microsoft Office-XP PIA dll’s as these dll’s were been...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
8
by: Sam | last post by:
Hi All, I posted this message few days ago. No one has answered so far. I just would like to know if it is possible to do or not. Even if you can not tell me how to do this, maybe you know which...
16
by: LP | last post by:
Hello, I am trying to use .NET with Excel. I installed Office 2003 and selected ..NET programming suport option, so it installed all those PIA, as MS sugests. But I can not find a way to destroy...
2
by: Senthil | last post by:
Hi All I need to create an Excel report and create a command button and have to run a macro on the click event that will print all the pages in the Excel workbook. I am able to create the report...
0
by: liam_jones | last post by:
I'm very new to Python, well IronPython to precise, and have been having problems when using Excel. The problem I'm having is the closing of my Excel object. I'm able to successfully quit the...
7
by: owuraku | last post by:
At the end of each year (i.e. on every December 31) I want to create a new Excel Workbook (spreadsheet). Thus on December 31, 2008, I want to create a workbook called 2009. Now at the day 1of each...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.