473,395 Members | 2,192 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,395 software developers and data experts.

Console application to generate Excel file

Hi all
I created a C# console application that is called through a
stored procedure using xp_cmdshell. The application generates an Excel
report from the database with a macro embedded in it. The report
generation fails when it is through xp_cmdshell.
But when I tried to run the executable from the command prompt the
report gets generated successfully with the macro. What could be the
problem here??

Thanks in advance
Senthil

Jan 15 '07 #1
10 4980
On 15 Jan 2007 05:33:02 -0800, Senthil wrote:
Hi all
I created a C# console application that is called through a
stored procedure using xp_cmdshell. The application generates an Excel
report from the database with a macro embedded in it. The report
generation fails when it is through xp_cmdshell.
But when I tried to run the executable from the command prompt the
report gets generated successfully with the macro. What could be the
problem here??

Thanks in advance
Senthil
Probably the sql server account that you use to run the xp_cmdshell account
does not have the rights to run such system stored procedures. You'll need
to grant the account the appropriate rights

--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 15 '07 #2
Rad,

Will you be so kind not to answer C# questions in the VB.Net newsgroup.

I never saw that done by a MVP without telling at least that there was a
better newsgroup for that.

Thanks in advance

Cor

"Rad [Visual C# MVP]" <no****@nospam.comschreef in bericht
news:11***************@thinkersroom.com...
On 15 Jan 2007 05:33:02 -0800, Senthil wrote:
>Hi all
I created a C# console application that is called through a
stored procedure using xp_cmdshell. The application generates an Excel
report from the database with a macro embedded in it. The report
generation fails when it is through xp_cmdshell.
But when I tried to run the executable from the command prompt the
report gets generated successfully with the macro. What could be the
problem here??

Thanks in advance
Senthil

Probably the sql server account that you use to run the xp_cmdshell
account
does not have the rights to run such system stored procedures. You'll need
to grant the account the appropriate rights

--
Bits.Bytes
http://bytes.thinkersroom.com

Jan 16 '07 #3

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eY**************@TK2MSFTNGP04.phx.gbl...
Rad,

Will you be so kind not to answer C# questions in the VB.Net
newsgroup.

I never saw that done by a MVP without telling at least that there was
a better newsgroup for that.

Thanks in advance

Cor

"Rad [Visual C# MVP]" <no****@nospam.comschreef in bericht
news:11***************@thinkersroom.com...
>On 15 Jan 2007 05:33:02 -0800, Senthil wrote:
>>Hi all
I created a C# console application that is called through a
stored procedure using xp_cmdshell. The application generates an
Excel
report from the database with a macro embedded in it. The report
generation fails when it is through xp_cmdshell.
But when I tried to run the executable from the command prompt the
report gets generated successfully with the macro. What could be the
problem here??

Thanks in advance
Senthil

Probably the sql server account that you use to run the xp_cmdshell
account
does not have the rights to run such system stored procedures. You'll
need
to grant the account the appropriate rights

--
Bits.Bytes
http://bytes.thinkersroom.com


Jan 16 '07 #4
The irony is the answer had nothing to do with either
C# *or* VB. ;-)

Robin S.
-----------------------
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:jr******************************@comcast.com. ..
>
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eY**************@TK2MSFTNGP04.phx.gbl...
>Rad,

Will you be so kind not to answer C# questions in the VB.Net
newsgroup.

I never saw that done by a MVP without telling at least that there
was a better newsgroup for that.

Thanks in advance

Cor

"Rad [Visual C# MVP]" <no****@nospam.comschreef in bericht
news:11***************@thinkersroom.com...
>>On 15 Jan 2007 05:33:02 -0800, Senthil wrote:

Hi all
I created a C# console application that is called through
a
stored procedure using xp_cmdshell. The application generates an
Excel
report from the database with a macro embedded in it. The report
generation fails when it is through xp_cmdshell.
But when I tried to run the executable from the command prompt the
report gets generated successfully with the macro. What could be
the
problem here??

Thanks in advance
Senthil

Probably the sql server account that you use to run the xp_cmdshell
account
does not have the rights to run such system stored procedures.
You'll need
to grant the account the appropriate rights

--
Bits.Bytes
http://bytes.thinkersroom.com



Jan 16 '07 #5
ROBIN

how cute

oh did the wuss-ass female programmer finally realize that
microsoft.public.vb is a dead newsgroup so all the vb kids come here?

WHY DO WE USE A NEWSGROUP NAMED DOTNET FOR A LANGUAGE THAT ISNT CALLED
DOTNET?

VB 2005 HAS _NEVER_ BEEN REFERRED TO AS VB DOTNET 2005

and admitting that MS made a mistake-- 5 years ago-- when they changed
the name of the VB newsgroup from microsoft.public.vb to
microsoft.public.dotnet.languages.vb

that is the root of the problem


RobinS wrote:
The irony is the answer had nothing to do with either
C# *or* VB. ;-)

Robin S.
-----------------------
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:jr******************************@comcast.com. ..

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eY**************@TK2MSFTNGP04.phx.gbl...
Rad,

Will you be so kind not to answer C# questions in the VB.Net
newsgroup.

I never saw that done by a MVP without telling at least that there
was a better newsgroup for that.

Thanks in advance
>
Cor

"Rad [Visual C# MVP]" <no****@nospam.comschreef in bericht
news:11***************@thinkersroom.com...
On 15 Jan 2007 05:33:02 -0800, Senthil wrote:

Hi all
I created a C# console application that is called through
a
stored procedure using xp_cmdshell. The application generates an
Excel
report from the database with a macro embedded in it. The report
generation fails when it is through xp_cmdshell.
But when I tried to run the executable from the command prompt the
report gets generated successfully with the macro. What could be
the
problem here??

Thanks in advance
Senthil

Probably the sql server account that you use to run the xp_cmdshell
account
does not have the rights to run such system stored procedures.
You'll need
to grant the account the appropriate rights

--
Bits.Bytes
http://bytes.thinkersroom.com

Jan 16 '07 #6
On Tue, 16 Jan 2007 06:58:39 +0100, Cor Ligthert [MVP] wrote:
Rad,

Will you be so kind not to answer C# questions in the VB.Net newsgroup.

I never saw that done by a MVP without telling at least that there was a
better newsgroup for that.

Thanks in advance

Cor
Well, Cor, as far as I can tell the question and answer have nothing to do
with C# so I didn't think twice about it.

--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 16 '07 #7
There you go, making assumptions about my gender again.
Tsk tsk tsk.

Have a nice day.
Robin S.
-------------------------
<aa*********@gmail.comwrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
ROBIN

how cute

oh did the wuss-ass female programmer finally realize that
microsoft.public.vb is a dead newsgroup so all the vb kids come here?

WHY DO WE USE A NEWSGROUP NAMED DOTNET FOR A LANGUAGE THAT ISNT CALLED
DOTNET?

VB 2005 HAS _NEVER_ BEEN REFERRED TO AS VB DOTNET 2005

and admitting that MS made a mistake-- 5 years ago-- when they changed
the name of the VB newsgroup from microsoft.public.vb to
microsoft.public.dotnet.languages.vb

that is the root of the problem


RobinS wrote:
>The irony is the answer had nothing to do with either
C# *or* VB. ;-)

Robin S.
-----------------------
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:jr******************************@comcast.com ...
>
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eY**************@TK2MSFTNGP04.phx.gbl...
Rad,

Will you be so kind not to answer C# questions in the VB.Net
newsgroup.

I never saw that done by a MVP without telling at least that there
was a better newsgroup for that.

Thanks in advance
>>
Cor

"Rad [Visual C# MVP]" <no****@nospam.comschreef in bericht
news:11***************@thinkersroom.com...
On 15 Jan 2007 05:33:02 -0800, Senthil wrote:

Hi all
I created a C# console application that is called
through
a
stored procedure using xp_cmdshell. The application generates an
Excel
report from the database with a macro embedded in it. The report
generation fails when it is through xp_cmdshell.
But when I tried to run the executable from the command prompt
the
report gets generated successfully with the macro. What could be
the
problem here??

Thanks in advance
Senthil

Probably the sql server account that you use to run the
xp_cmdshell
account
does not have the rights to run such system stored procedures.
You'll need
to grant the account the appropriate rights

--
Bits.Bytes
http://bytes.thinkersroom.com


Jan 17 '07 #8
i just pick sweetheart; we don't see many female programmers out here

btw; did you go to wsu?

Jan 18 '07 #9
If I were you, I wouldn't assume I was female just because my
name is Robin.

And no, I did not go to wsu.

Robin S.
-------------------
<aa*********@gmail.comwrote in message
news:11*********************@s34g2000cwa.googlegro ups.com...
>i just pick sweetheart; we don't see many female programmers out here

btw; did you go to wsu?

Jan 19 '07 #10
lol good stuff

just because you're a wuss and you've got no balls; that somehow makes
you 'not a female'?

someone with balls would question dotnet

why are we working for a language that used to be the most popular; but
now it doesn't have a 10% marketshare?

BECAUSE WE WERE CONNED AND ABUSED BY MICROSOFT

and now they ask us to learn a real langauge like C#?

NOT WHEN THEY JUST FUCKED US BY KILLING OFF VB FOR NO REASON

why are we in a newsgroup called DOTNET talking about a product that
isn't called DOTNET?
and why is microsoft.public.vb make it look like VB is completely dead?

they never should have renamed the newsgroup from microsoft.public.vb

there is no reason why I can't go to microsoft.public.vb and talk about
Visual Fucking Basic

-Aaron

Jan 19 '07 #11

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

Similar topics

2
by: Steve Miller | last post by:
hello... i am a 'user' of access, meaning, i import excel files, join, and merge....that's about the extent of my expertise with ms-access. my boss wants me to create an access application that...
0
by: Jim Heavey | last post by:
I create a console application. This application creates a simple Excel File. I move this application to a server. I use the .Net Configuration utility and grant the application full access...
2
by: Jatin | last post by:
Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); excelApp.Visible = true; string workbookPath = @"d:\change.xls"; ...
1
by: Gorgo | last post by:
Hello I'm sorry if this is not the right group to post this post, but unfortunetly this one is one of the best i know. I'm doing and asp.net application with need to create excel file thru...
9
by: John Bailo | last post by:
I want to generate an Excel file (.xls format) from some database data. I don't want to use Excel.exe because of all the automation and security issues. Does Microsoft document the .xls file...
3
by: =?Utf-8?B?VGVycmFuY2U=?= | last post by:
Good Afternoon: I have two questions I was hoping someone can help me with. 1. I've created a app that creates a xml file; the project was constructed as a console window. I want to know is...
3
by: Magnus.Moraberg | last post by:
Hi, I have a C# .net application. In this application, the user clicks on a button to generate an excel file. I save the macros which compose this generate file within an excel template file....
6
by: Gilbert Tordeur | last post by:
Hello ! My web application generates an Excel sheet on the server. Then I would like to generate a pdf file from this Excel sheet. How can I do ? Thank you for your help, Gilbert
2
by: Gilbert Tordeur | last post by:
Hello, My Web application in VB2008 with IIS calls Excel (2003) to create an Excel file xls. I use therefore Microsoft.Office.Interop.Excel, version 11. This application does not use anonymous...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.