Convert Multi-Sheet Workbook to Standalone Executable

  • Thread starter Thread starter George Orwell
  • Start date Start date
G

George Orwell

My company has developed a fairly sophisticated, multi-sheet Excel
workbook that they would like to "productize" by converting and
compiling it to a standalone, executable program. The intent is to
provide their clients with the program, allowing them to run it
without the need for Excel. Is there a simple convert and compile
process that works, while protecting the company's proprietary
algorithms and data?

Any guidance would be appreciated.

TIA.
 
I'd assume that the worksheets are simply tables of data?
I'd also assume that some sheets are used to display & manipukate the data.

First, take the data and put it into a database - SQL Server databases are
what we use, and the good news is that its very simply to suck data into a
SQL database table from an Excel Workbook.

Next, you'd need to define exactly what it is you'd want to do with the data
in terms of displaying and editing the tables...usually a job for an analyst
on larger projects.

Finally, using say Visual C# or VB6 or some such language, build your gui.

In the meantime, what you might cinsider is a C# or VB application that can
invisibly open your Excel, manipulate the data etc and then dump the results
out as required. This is trivial IF the procedures currently in place are
robust enough.


The following is a VB Script that I used once, save to a TEXT file, say
using Notepad and rename to something with .VBS as the extension


Option Explicit
Dim XLApp
Dim wbMain
MAIN

SUB Main()
' instantiate an instance of the Excel Application
Set XLapp = CreateObject("Excel.Application") ' New Excel.Application

'''XLapp.visible = true ' for testing

' open the workbook
Set wbMain = XLApp.Workbooks.Open("S:\demo\MyExceldemo.xls")

'run the code
with XLApp
.Run "Proc_Main", sControlDate, tsLog, Traders, Exports

' now clsoe it without saving
XLapp.DisplayAlerts = False
wbMain.Close False
.DisplayAlerts = True
Set wbMain = Nothing
End With
'close excel & release emory
XLApp.Quit
Set XLApp = Nothing
End Sub




This is an examp;e of opening a workbook, calling a procedure called
Proc_Main which has four parameters. The procedure is withing a module in
Excel that munges whatever, printing out results, saving text files etc.

Should give you some ideas.

For those interested, VBScript is part of WindowsXP.
Try this, right click on your desktop and select New -->Text Document
Open the new text document and type one line
msgbox "hello world!"
save this and rename the document as hello.vbs say on your desktop
now double click the new hello.vbs icon. guess what!


HTh
Patrick Molloy
Microsoft Excel MVP
 
No. You need XL installed on the client's PC.

If you wanted to make the application an EXE, not reliant on XL being
installed on the client's PC, then that *can* be done, however, you will
need to do it in VB and use a custom grid control which, depending on your
wb, might need to support in-cell formulae. You can either use a freeware
version or buy a license to one on the net- there are a few available!

Note that the "conversion" to VB is a lengthy one as worksheet references
will have to be changed to grid-control references and you will need to
manually code/simulate workbook & worksheet events. Believe me, the best
idea is to keep it as-is as most desktops these days have XL loaded.

I'll do it for you, at a price!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top