gopal_amlekar

Hi,

I have MS VB2005 Express version and Excel 2000 installed.

I want to embed complete Excel object on a form in my project. It should include the Excel menus and all functionality.

Most of the solutions presented in the forum are of the type of controlling external instance of the Excel.

I tried to use Office XP PIAs but it doesn't work.

A reference to the Excel 9.0 OLB gives some error.

I also tried using an OLEDB but the datasource for an oledb connection doesn't allow excel type.

I was able to display and manipulate an excel document from within a web browser. But in that case, excel menus etc. are not available.

Is there any solution

Thanks and Regards,



Re: Visual Basic General Embedding Excel 2000 in VB2005

Matt_tvd

Hi,

You can add the AxSpreadsheet control to your toolbox:

Right click in toolbox -> Choose Items... -> select the COM Components tab -> scroll down and add the Microsoft Office Spreadsheet 9.0 or 10.0 (depending on your excel version).

This control has the excel toolbars.

I'm not sure how to open spreadsheets into it though.

Hope this helps.

Matt





Re: Visual Basic General Embedding Excel 2000 in VB2005

gopal_amlekar

Hi,

Thanks for this. But I had tried it and the message I got when adding the control on form was:

"Failed to Import ActiveX control. Please ensure it is properly registered".

I have not found any way to register it. How to do that

Thanks..





Re: Visual Basic General Embedding Excel 2000 in VB2005

Matt_tvd

OK.

This might help:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=459452&SiteID=1

Try adding the control, click ok to the error, then rebuild your project and add the control again.

Hope that helps.

Matt





Re: Visual Basic General Embedding Excel 2000 in VB2005

gopal_amlekar

Thanks..

It worked but I am not able to put data in it. Moreover, the control isn't smart and as elegant as Excel. So I have dropped the idea. I will use an external instance of excel.

Thanks for your help...