PDA

Click to See Complete Forum and Search --> : OLE Excel without haveing Excel on the computer?


Tre
Jun 9th, 2002, 03:27 AM
I am developing a program that uses OLE to transfer data back and forth between Excel and my VBA. My program works GREAT!:D
Except for one small detail. Those who choose not to have Excel installed on their machine can't run the program...:mad:
My question is:
How do you make an OLE VBA code work on a machine that doesn't have Excel installed?

Option 2::eek:

The program uses a chart and a graph from an existing .XLS file in the OLE section of my program. If it is not possible to run this file on non-"Excel"-ed computers.... how can I use Flexgrid and MSChart or MSGraph to make the same thing happen....

EX: An input for textbox 1 is sent to Excel Cell A3. That is then graphed out on the Chart built into the Excel Sheet. Then the info from the Sheet and Chart are sent back to my programs linked OLE to display them for the user to see.

If that is not enough information to answer my wuestions, please let me know and I will add more detail.

Thanks for your time.

Tre:cool:

alex_read
Jun 10th, 2002, 05:12 AM
1) I know with the office Developer tools you can use a tool for Access files to run without Access being on the machine, I don't tink it's possible with Excel though.

You'll find that MsChart and MsQuery are installed when you put office onto the machine, the chances are, if the user hasn't got Excel, they may well not have these either.

1) To populate an excel file into an MsFlexgrid control, look up the textmatrix property.

2) As an alternative to the MsChart, you might want to look at some of the sample vb apps from www.planetsourcecode.com or www.vbcode.com as I've seen some custom created chart programs there before.

patrickfitzg
Jul 7th, 2002, 04:25 PM
If no Excel, revert to writing to and reading from (shudder) a csv file.

Not quite too sure how useful an Excel file will be for people who don't want to install it on their machine.

If it is a small file and they have IE 4+, try writing to xml file (tip: use late binding and make sure file size is small or it will choke on the load method).