Excel and VB

  • Thread starter Thread starter Newbie!
  • Start date Start date
N

Newbie!

Hi group,

Could somebody possible point me in the right direction?

Is it possible to Show a Excel Spreadsheet in a VB Program?

I don`t need to update it just view it on WinForms

Ta
Si
 
Newbie! said:
Hi group,

Could somebody possible point me in the right direction?

Is it possible to Show a Excel Spreadsheet in a VB Program?

I don`t need to update it just view it on WinForms

In advance: I don't have more info than this. The only way I have heard of
is embed the excel sheet in a web page and use the web browser control to
view it.

I don't know why the OLE control isn't there anymore.
 
This code will bring up an instance of Excel
Sub BuildExcel()
Dim ObjExcel As Excel.Application
Dim row, col As Short
ObjExcel = CreateObject
("Excel.application")
ObjExcel.Application.Visible = True
ObjExcel.Workbooks.Add()
row = 1
col = 1
Make certain you add a reference to Excel's object library.

The application this came out of actually wrote data to
the spread sheet but you should be able to modify the
above code to show an existing spread sheet.
 
¤ Hi group,
¤
¤ Could somebody possible point me in the right direction?
¤
¤ Is it possible to Show a Excel Spreadsheet in a VB Program?
¤
¤ I don`t need to update it just view it on WinForms

There is no OLE Object control in VB.NET but you can still use the WebBrowser control:

HOWTO: Use the WebBrowser Control to Open an Office Document in Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;304643


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top