Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VB.NET 2005: Open an Excel Spreadsheet, modify it and then save it | Excel Programming | |||
how do I modify and save a default footer? | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Modify Save As menu item | Excel Programming | |||
is there a way I can modify the save as dialong box? | Excel Programming |