Login | |
|
 |
RE: HTA Spreadsheet - Spawn and populate? - 8/10/2007 1:51:12 AM
|
|
 |
|
| |
mcds99
Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
|
The special function used to load stuff when the HTA starts is REALLY cool! Function window_onload Ack, Ack, Ack, Ack, Ack, Ack (your stuff) ;-) End Function
_____________________________
Sam Keep it Simple Make it Fun KiSMiF
|
|
| |
|
|
|
 |
RE: HTA Spreadsheet - Spawn and populate? - 8/10/2007 2:01:35 AM
|
|
 |
|
| |
Brad
Posts: 13
Score: 0
Joined: 8/10/2007
Status: offline
|
Smarta$$. :) That works just fine, if I want a blank spreadsheet to pop up on the screen as soon as the HTA is loaded. To make a long story short, let's say I want nothing but a button on the screen. When I click the button, I want a fully-populated and properly formatted spreadsheet to appear in a <span>. Right now, I have two options to run this thing: 1) show the user a blank spreadsheet, populate it on the click of a button. (works, but looks Busch League.) 2) don't show the user a blank spreadsheet, spawn a blank spreadsheet on the click of a button, populate on the click of another button. (pointless) ...but I need option 3. 3) don't show the user a blank spreadsheet, spawn AND populate on the click of a button. The catch-22 is that the object has to exist for it to be populated, but the object has to be displayed blank on the screen for it to exist. It would be nice if I could invisibly create the object, populate it, then bring it into view. Is it possible? Thanks! -Brad
|
|
| |
|
|
|
 |
RE: HTA Spreadsheet - Spawn and populate? - 8/10/2007 2:25:03 AM
|
|
 |
|
| |
mcds99
Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
|
As far as CSS goes, I'm lost. I would use the onload to populate the spreadsheet non-interactive. Loop through writing the rows and columns objSheet.Cells(row, 1).value = ClmA objSheet.Cells(row, 2).value = ClmB etc... Then save it... objExcel.DisplayAlerts = False objExcel.ActiveWorkbook.SaveAs XlsPath objExcel.ActiveWorkbook.Close objExcel.Application.Quit row = row + 1 And so on... Then the button to display it. *** Where is the data coming from, a database?
_____________________________
Sam Keep it Simple Make it Fun KiSMiF
|
|
| |
|
|
|
|
|