Link to home
Start Free TrialLog in
Avatar of AVaulin
AVaulinFlag for Ukraine

asked on

Embedded Excel sheet controlling

I've embedded Excel sheet into my view (I used standard OLE COleInsertDialog). Now I want to control that sheet. For example I want to open existing xls-file. What do I have to do?
Avatar of naveenkohli
naveenkohli

This will happen through the magic of Menu merging. When you embeded excel into your application, menu from Excel application should have merged with menu of your aplication. Now you can goto File, New menu and open the existing file. The view for excel sheet should be active at that time.
If the two menus did not merge, then houston we have problem :)

Good Luck!
Avatar of AVaulin

ASKER

Yes, menus were merged. But Excel's "File" menu is not accessable. You can try open excel file in DevStudio and see how menus will be merged: "File" menu will be from Studio and others will be from Excel.
So I can't accept your answer.
When you used COleInserDialog did ya use the option of inserting from existing file. Then you browse for the excel sheet you want to embed and that xls will be opened in your view.
Avatar of AVaulin

ASKER

Yes, it works. But it does not mean controlling (see question text). How (for example) can I change A1 cell text? MS sample COMEXCEL uses "Range" function to do it. But they do not use embedding in that sample.
Avatar of AVaulin

ASKER

Adjusted points to 300
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AVaulin

ASKER

Thank you.
Let me try. Wait some time...
Avatar of AVaulin

ASKER

It works exactly how I wanted.
Thank you.