×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Compiling a spreadsheet

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.

RE: Compiling a spreadsheet

You could compile the VBA code in VB and have the program run a session of Excel although my experience with SolidWorks (not an apple to apple comparison) is that the macro code runs several times faster than the VB compiled code unless it is made to be an add-in.

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

(OP)
The best case scenario for what I have proposed woyuld be that the new program would run independantly of Excel. It would be able to run on computers without Excel installed.

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

VB has the MSHFlexGrid control that may fit your needs.

Regards,

Regg

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources