Making own save/load function in Excel
Hi,
I've just about finished creating a financial analysis spreadsheet for a project I am working on but it's size is pretty big - about 5megs so far. I also want to pass the application around for other people to use. However, I don't want people to have to save the whole spreadsheet each time they use it on a different project. At 5megs it's soon going to start taking up a lot of space once they've used it a few times.
The actual user-input data in the spreadsheet is small compared to the total size of the application.....about 10% of the total size. Most of the memory usage is due to the spreadsheet analysis functions and graphs that I've programmed in.
So....I was thinking that it might be a good idea to put in my own save/save as.../load functions, say have buttons that you press.
Only I'm not sure the best way to do this. I was thinking that I could:
1) Have the user-input data exported as another workbook and then load this back into the application.
2) Create a worksheet in the workbook that stores a copy of the user inputted data and then export this worksheet on saving and import it on loading.
3) Create a text file and then import this back in when loading. Don't know how I would tell Excel where to put the imported data though........via VBA maybe?
Anyway, if anyone has any ideas or advice, it would be appreciated. :)
Thanks
-Rob
Re: Making own save/load function in Excel
XML may be the way to go.
Re: Making own save/load function in Excel
How about a user data input spreadsheet (template empty) and your analysis then points to whichever user sheet the user wants.
Then all the analysis bits stay the same, and you can decide whether to wipeout and copy over the user data for analysis.
You'd need the API calls for selecting a file (I have them in a module if you are interested) or use the active x control to select the file to use.
Vince