Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy, modify and save a spreadsheet a from web application

I have a template for an invoice. It just has placeholders for all of the
information I need to save to it.

I'm working in an asp.net environment (using VB) where I need to
programmatically generate invoices.

I need to copy the template spreadsheet and then modify the copy.

What's the code that I'll need to do this?

Also, given that the web app is multi-threaded, what do I need to keep in
mind to be sure that multiple invoices can be created simultaneously? Do I
have to worry about multiple instances of excel opening up?

I'm really a total noob with office programming. So forgive my dumb
questions. Your help will be GREATLY appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Copy, modify and save a spreadsheet a from web application

I wouldn't "copy the template". Just open it read only, modify it and use
SaveAs. You should be able to find lots of examples of automating Excel on
the web if you search for them. I think your best bet is to write the code
in Excel and when you get that working make the modifications needed to run
externally, which is mostly to add the Excel object to the beginning of some
lines. And avoid any named constants which are undefined outside of Excel.
Just use the underlying constant like -4143 instead of xlWorkbookNormal.

Do I have to worry about multiple instances of excel opening up?


I suppose having 100 instances of Excel open at a time might retard
performance I'm not sure what you can do about it. Just make sure your app
closes any instances it creates.

--
Jim
"Copy, modify and save a spreadsheet" <Copy, modify and save a
wrote in message
...
|I have a template for an invoice. It just has placeholders for all of the
| information I need to save to it.
|
| I'm working in an asp.net environment (using VB) where I need to
| programmatically generate invoices.
|
| I need to copy the template spreadsheet and then modify the copy.
|
| What's the code that I'll need to do this?
|
| Also, given that the web app is multi-threaded, what do I need to keep in
| mind to be sure that multiple invoices can be created simultaneously? Do I
| have to worry about multiple instances of excel opening up?
|
| I'm really a total noob with office programming. So forgive my dumb
| questions. Your help will be GREATLY appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Copy, modify and save a spreadsheet a from web application

If the template is relatively simple then in the past I've saved it as XML
then just replaced placeholder tokens with data and sent it out as XML
(text) with an Excel header. Does not involve using Excel on the server.

Tim

"Jim Rech" wrote in message
...
I wouldn't "copy the template". Just open it read only, modify it and use
SaveAs. You should be able to find lots of examples of automating Excel
on
the web if you search for them. I think your best bet is to write the
code
in Excel and when you get that working make the modifications needed to
run
externally, which is mostly to add the Excel object to the beginning of
some
lines. And avoid any named constants which are undefined outside of
Excel.
Just use the underlying constant like -4143 instead of xlWorkbookNormal.

Do I have to worry about multiple instances of excel opening up?


I suppose having 100 instances of Excel open at a time might retard
performance I'm not sure what you can do about it. Just make sure your
app
closes any instances it creates.

--
Jim
"Copy, modify and save a spreadsheet" <Copy, modify and save a
wrote in message
...
|I have a template for an invoice. It just has placeholders for all of the
| information I need to save to it.
|
| I'm working in an asp.net environment (using VB) where I need to
| programmatically generate invoices.
|
| I need to copy the template spreadsheet and then modify the copy.
|
| What's the code that I'll need to do this?
|
| Also, given that the web app is multi-threaded, what do I need to keep
in
| mind to be sure that multiple invoices can be created simultaneously? Do
I
| have to worry about multiple instances of excel opening up?
|
| I'm really a total noob with office programming. So forgive my dumb
| questions. Your help will be GREATLY appreciated.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.NET 2005: Open an Excel Spreadsheet, modify it and then save it MaxGruven Excel Programming 0 February 28th 08 08:46 PM
how do I modify and save a default footer? JR Excel Discussion (Misc queries) 1 June 26th 07 02:23 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Modify Save As menu item Bill80210 Excel Programming 1 March 23rd 06 07:24 PM
is there a way I can modify the save as dialong box? Peekabeaux Excel Programming 1 March 14th 05 06:51 PM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"