Excel.Automation - No way setting it to be visible !

  • Thread starter Thread starter Franck
  • Start date Start date
F

Franck

Hi,
I'm using an xls file through my web service to print out a pdf file
from which I returned path.

In this way, got a macro in my XLS file which do the print out.
Testing it from the xls file works great.
Testing it through my web service failed !

Looking in the pdf printer, I can see no sheets have been selected
despite the fact I did it in the macro.
So , nothing is printed and my web service wait for eternity...

I think it's because my Excel.Workbook object is hidden.

I'm tryin to make the Excel.Application visible, the workbook, anything
possible but NOTHIN ! IMPOSSIBLE to get this @#! spreadsheet visible !

Does somebody has an idea, a sample, a suggestion ?

Please help :(

Thks.
 
Franck said:
Hi,
I'm using an xls file through my web service to print out a pdf file
from which I returned path.

In this way, got a macro in my XLS file which do the print out.
Testing it from the xls file works great.
Testing it through my web service failed !

Looking in the pdf printer, I can see no sheets have been selected
despite the fact I did it in the macro.
So , nothing is printed and my web service wait for eternity...

I think it's because my Excel.Workbook object is hidden.

I'm tryin to make the Excel.Application visible, the workbook, anything
possible but NOTHIN ! IMPOSSIBLE to get this @#! spreadsheet visible !

Does somebody has an idea, a sample, a suggestion ?

Please help :(

Thks.

Please stop this, you are trying to do something that isn't possible.
Office tools aren't designed to run server-side (automated from a Service,
Webserver etc...) and aren't supported in such context. Read following KB
article carefully
http://support.microsoft.com/default.aspx?scid=kb;en-us;257757 and go for a
solution that doesn't need Office at the server (like -
http://officewriter.softartisans.com/officewriter-86.aspx), or wait for VSTO
2005.

Willy.
 
I think you may be misundestanding what I'm tryin to do.
I don't want my client to access Excel.

I just want my Excel Automation to be visible on server for that my
macro generate my pdf... And that's all.

IT WILL NEVER HAPPEN THAT CLIENT SEE EXCEL.

The result of all that is the url of the new generated pdf. nothin
more.
And it seems to do not work in my Excel Automation object is hidden and
only visible as a process.
 
Franck said:
I think you may be misundestanding what I'm tryin to do.
I don't want my client to access Excel.

I just want my Excel Automation to be visible on server for that my
macro generate my pdf... And that's all.

IT WILL NEVER HAPPEN THAT CLIENT SEE EXCEL.

The result of all that is the url of the new generated pdf. nothin
more.
And it seems to do not work in my Excel Automation object is hidden and
only visible as a process.

No, I'm afraid you didn't understand what I talking about, I'm talking about
server-side not client side.
And what sense does it make to visualize something at the server, there
might be no-one logged on at the server.
Please read the KB article, and try to understand the issues.

Willy.
 
I get it. (and read the both linked page).
Indeed I know it's a stupid way but Excel seems to be the only software
to do the kind of charts they are lookin for. Crystal Report Can't. So,
here is my problem.

The point is that I'll have to convince the guys I work for.
 
Furthermore, my web service won't be available more than twice a time
and I must use Excel because of its Charting abilities...
 
Franck said:
I get it. (and read the both linked page).
Indeed I know it's a stupid way but Excel seems to be the only software
to do the kind of charts they are lookin for. Crystal Report Can't. So,
here is my problem.

The point is that I'll have to convince the guys I work for.

That's possible, but doesn't explain why it needs to be available as a
webservice, what does your webmethod return to the client, Nothing?. Who's
on the server to react on all possible dialogs that might pop up when
something goes wrong? Seach the internet and these NG's for stories like,
"how do I kill an instance of Excel on the server", "I have multiple
instances running which one is mine".... maybe this will convince the guy
you work for.

Willy.
 
Hi,
My WebMethod just return the path for the new created pdf, doing a
response.redirect from my aspx page in the end.

The main problem is not using Excel or not, I HAVE NO CHOICE.
The point is that printing (as a pdf) my workbook from an
Excel.Automation object does not work (the postscript file is 0 ko)...
and it seems that it's because it's not visible.

Maybe, in a very short time, they'll see the server is completely out
because of this system and will change of mind...
 
Back
Top