DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   VB.NET (http://www.daniweb.com/forums/forum58.html)
-   -   How to display Excel file in a tabPage? (http://www.daniweb.com/forums/thread48792.html)

MikeLI Jun 28th, 2006 4:56 am
How to display Excel file in a tabPage?
 
Hi All,

My VB.NET program uses tabControl, which consists 8 tabPages, as the user interface. Basically, everything is done there, except when Excel file is opened.

My program reads Excel file by the following function:

VB:

 
Private Sub btnReadFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReadFile.Click
    excelApp = New Excel.Application
    excelApp.Visible = True
    excelApp.UserControl = True
    excelApp.DisplayAlerts = False
    xls = excelApp.Workbooks.Open(txtInFile.Text)
    init()
EndSub

When the Excel file is read, it is not attached in the VB program, but shown up independently.
How can I show it in one of the tabPages?

Mike


All times are GMT -4. The time now is 6:56 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC