Compiling a spreadsheet
Compiling a spreadsheet
(OP)
Has anyone ever attempted to compile a spreadsheet into a stand alone program?
Consider a sreadsheet with a considerable amount of VBA code, formulae and user forms. Items which are native to excel run quickly, functions added to the spreadsheet with VBA run slowly. If a person could compile the spreadsheet it stands to reason that the code code be optimised for speed during the compilation process and the compiled code would run faster than the VBA in any case.
I realise that an Excel spreadsheet and VBA "children" of the Excel environment but code is code. Excel acts as a realtime compiler for its children, why not develope a way for the children to grow up and live on their own.
Consider a sreadsheet with a considerable amount of VBA code, formulae and user forms. Items which are native to excel run quickly, functions added to the spreadsheet with VBA run slowly. If a person could compile the spreadsheet it stands to reason that the code code be optimised for speed during the compilation process and the compiled code would run faster than the VBA in any case.
I realise that an Excel spreadsheet and VBA "children" of the Excel environment but code is code. Excel acts as a realtime compiler for its children, why not develope a way for the children to grow up and live on their own.





RE: Compiling a spreadsheet
I would imagine there are many other ways in which you can accomplish what you want (maybe embedding a spreadsheet inside a VB form). I am still learning to use VBA with Excel so I have a lot to learn myself.
Regards,
Regg
RE: Compiling a spreadsheet
Compiling code from source code is merely a translation from something the programmer can understand to something the computer can understand. When a spreadsheet is examined by a compiler the compiler could create code to achieve the same result as the original part of the spreadsheet.
For my purposes the new program may not have an accessable spreadsheet component. As a concept the spreadsheet is merely a 2 dimensional array, therefore its contents could be held in an array. So as the compiler reviews a sreadsheet it could replace the spreadsheet with an array cell by cell.
Maybe a stepping stone is to compile the spreadsheet into source code for C# or some other language.
The overall advantage is that users familiar with Excel and VBA could develop software without learning an new programming language.
RE: Compiling a spreadsheet
Regards,
Regg