VB reads Excel
-
I have a VB 6.0 exe. It reads data from an excel spreadsheet and writes to it as well. So, the excel spreasheet is like a database for it. Presently, the spreadsheet resides in a LAN. Now I want to "INJECT" the excel spreadsheet into the executable, so that the excel spreadsheet is not a separate entity anymore, and is a part if the executable itself. Basically, how can I turn it into an intrinsic application resource? Can someone please shed some light on how I can do this? Thanks.
ASP - AJAX is SEXY. PERIOD.
-
I have a VB 6.0 exe. It reads data from an excel spreadsheet and writes to it as well. So, the excel spreasheet is like a database for it. Presently, the spreadsheet resides in a LAN. Now I want to "INJECT" the excel spreadsheet into the executable, so that the excel spreadsheet is not a separate entity anymore, and is a part if the executable itself. Basically, how can I turn it into an intrinsic application resource? Can someone please shed some light on how I can do this? Thanks.
ASP - AJAX is SEXY. PERIOD.
The short answer is, you can't. An .EXE, when running, cannot be modified. The entire idea, though noble, isn't practical. You should be seperating code from data, not integrating it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
The short answer is, you can't. An .EXE, when running, cannot be modified. The entire idea, though noble, isn't practical. You should be seperating code from data, not integrating it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Thanks Dave. I understood that. Actually, I intend to hide the excel spreadsheet from the user. And when I say hide, I don't mean just physically (as in changing the file attribute to hidden), but logically as well. I.e., the user should not be aware at all that there is an excel spreadsheet involved. With that said, is there a way to covert the spreadsheet into a resoucre of some sort? Like a dll or something which will contain the spreadsheet. Everytime the exe runs, the EXE will "upack" the spreadsheet from the resource and when done editing, it will "repack" it into the resource. Any clues regarding this mechanism? Sorry for such vague statements, but I think I've captured the essence this time. Thanks.
ASP - AJAX is SEXY. PERIOD.
-
Thanks Dave. I understood that. Actually, I intend to hide the excel spreadsheet from the user. And when I say hide, I don't mean just physically (as in changing the file attribute to hidden), but logically as well. I.e., the user should not be aware at all that there is an excel spreadsheet involved. With that said, is there a way to covert the spreadsheet into a resoucre of some sort? Like a dll or something which will contain the spreadsheet. Everytime the exe runs, the EXE will "upack" the spreadsheet from the resource and when done editing, it will "repack" it into the resource. Any clues regarding this mechanism? Sorry for such vague statements, but I think I've captured the essence this time. Thanks.
ASP - AJAX is SEXY. PERIOD.
Bulky Fellow wrote:
Everytime the exe runs, the EXE will "upack" the spreadsheet from the resource
Yeah, putting the sheet into a resource is no problem - at compile time.
Bulky Fellow wrote:
it will "repack" it into the resource.
Putting it back into the .EXE or .DLL at runtime is the problem. Using normal methods, once the .DLL is loaded, the file is locked until the termination of your app. Again, it can't be modified. You MAY be able to gleen something useful from the app in this[^] article though. It copies resources between .EXE's and .DLL's, but there's a lot of hoops to jump through.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007