469,964 Members | 1,613 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

Creating a Data Source

Mel
I have Visual Basic code in the Page_Load event that makes a
connection to an Excel 11.0 file. Is it possible to do the equivalent
using a data source so it existed on the form? If so, how? A data
source would be handy since I need to retrieve the Excel data from
many procedures/functions in my VB code.

Dim appExcel As New Excel.Application
Dim wkbExcel As Excel.Workbook

appExcel = CreateObject("Excel.Application")
appExcel.Visible = False
wkbExcel = appExcel.Workbooks.Add("c:\support\Span Tables.xls")

Jul 10 '07 #1
1 1153
"Mel" <ML********@gmail.comwrote in message
news:11*********************@p39g2000hse.googlegro ups.com...
>I have Visual Basic code in the Page_Load event that makes a
connection to an Excel 11.0 file. Is it possible to do the equivalent
using a data source so it existed on the form? If so, how? A data
source would be handy since I need to retrieve the Excel data from
many procedures/functions in my VB code.

Dim appExcel As New Excel.Application
Dim wkbExcel As Excel.Workbook

appExcel = CreateObject("Excel.Application")
appExcel.Visible = False
wkbExcel = appExcel.Workbooks.Add("c:\support\Span Tables.xls")
This cannot be done in ASP.NET, as server-side Office Automation doesn't
work - Microsoft will not support any solution which attempts to do this...
http://support.microsoft.com/default...US;q257757#kb2

Instead, use ADO.NET or Aspose:
http://www.google.co.uk/search?sourc...22ADO%2eNET%22
http://www.aspose.com/Products/Aspos...s/Default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Ken Kazinski | last post: by
7 posts views Thread by Nathan Sokalski | last post: by
4 posts views Thread by tshad | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.