![]() |
Reading data from an Excel spreadsheet
Hi,
I have a need to read data from an Excel spreadsheet using ASP.NET (C# ). The data is then displayed in various locations on the web site. This should be very simple and I have been following David Hayden's excellent article on this (http://davidhayden.com/blog/dave/ archive/2006/05/26/2973.aspx) but I get type or namespace could not be found errors when I build. I've tried to include a reference for the following: System.Data.Odbc.OdbcFactory System.Data.OleDb.OleDbFactory System.Data.SqlClient.SqlClientFactory However I can't find any references for the above namespaces in the "Add Reference" .Net or COM sections. Is there anyway to easly read the cells from an Excel speadsheet? Thanks in advance so much for your help! Steve |
Re: Reading data from an Excel spreadsheet
Don't automate Office from a web app, it isn't supported.
Beyond that you need to ensure Office is actually installed on your web server and the machine you are compiling on. "S_K" <steve_kershaw@yahoo.com> wrote in message news:9513772c-3a69-491a-a4e7-0cf2efcafa5a@e23g2000prf.googlegroups.com... > Hi, > > I have a need to read data from an Excel spreadsheet using ASP.NET > (C# ). The data is then displayed in various locations on the web > site. This should be very simple and I have been following David > Hayden's excellent article on this (http://davidhayden.com/blog/dave/ > archive/2006/05/26/2973.aspx) but I get type or namespace could not be > found errors when I build. I've tried to include a reference for the > following: > > System.Data.Odbc.OdbcFactory > System.Data.OleDb.OleDbFactory > System.Data.SqlClient.SqlClientFactory > > However I can't find any references for the above namespaces in the > "Add Reference" .Net or COM sections. > > Is there anyway to easly read the cells from an Excel speadsheet? > > Thanks in advance so much for your help! > > Steve |
Re: Reading data from an Excel spreadsheet
David is using the Enterprise Library. You can download it from:
http://tinyurl.com/2blmwa You can also use the standard OLEDB bits, but you will have to have the Jet libraries installed. They are not part of the standard MDAC install as of MDAC 2.8, so you have to install them separately. -- Gregory A. Beamer MVP, MCP: +I, SE, SD, DBA Subscribe to my blog http://gregorybeamer.spaces.live.com/lists/feed.rss or just read it: http://gregorybeamer.spaces.live.com/ ************************************************* | Think outside the box! | ************************************************* "S_K" <steve_kershaw@yahoo.com> wrote in message news:9513772c-3a69-491a-a4e7-0cf2efcafa5a@e23g2000prf.googlegroups.com... > Hi, > > I have a need to read data from an Excel spreadsheet using ASP.NET > (C# ). The data is then displayed in various locations on the web > site. This should be very simple and I have been following David > Hayden's excellent article on this (http://davidhayden.com/blog/dave/ > archive/2006/05/26/2973.aspx) but I get type or namespace could not be > found errors when I build. I've tried to include a reference for the > following: > > System.Data.Odbc.OdbcFactory > System.Data.OleDb.OleDbFactory > System.Data.SqlClient.SqlClientFactory > > However I can't find any references for the above namespaces in the > "Add Reference" .Net or COM sections. > > Is there anyway to easly read the cells from an Excel speadsheet? > > Thanks in advance so much for your help! > > Steve |
Re: Reading data from an Excel spreadsheet
On Mar 26, 8:53*am, "Aidy" <noem...@noemail.xxx> wrote:
> Don't automate Office from a web app, it isn't supported. > > Beyond that you need to ensure Office is actually installed on your web > server and the machine you are compiling on. > > "S_K" <steve_kers...@yahoo.com> wrote in message > > news:9513772c-3a69-491a-a4e7-0cf2efcafa5a@e23g2000prf.googlegroups.com... > > > > > Hi, > > > I have a need to read data from an Excel spreadsheet using ASP.NET > > (C# ). The data is then displayed in various locations on the web > > site. This should be very simple and I have been following David > > Hayden's excellent article on this (http://davidhayden.com/blog/dave/ > > archive/2006/05/26/2973.aspx) but I get type or namespace could not be > > found errors when I build. I've tried to include a reference for the > > following: > > > System.Data.Odbc.OdbcFactory > > System.Data.OleDb.OleDbFactory > > System.Data.SqlClient.SqlClientFactory > > > However I can't find any references for the above namespaces in the > > "Add Reference" .Net or COM sections. > > > Is there anyway to easly read the cells from an Excel speadsheet? > > > Thanks in advance so much for your help! > > > Steve- Hide quoted text - > > - Show quoted text - So how do I collect data from Excel if I shouldn't automate Office from a web application? Should I be creating an .exe app? |
Re: Reading data from an Excel spreadsheet
re:
!> So how do I collect data from Excel if I shouldn't automate !> Office from a web application? Should I be creating an .exe app? No. Don't create an .exe app. Use a component like GemBox.Spreadsheet Free : http://www.gemboxsoftware.com/GBSpreadsheetFree.htm It's free, although it has some limitations: 1. Maximum number of rows per sheet is 150. 2. Maximum number of sheets per workbook is 5. If you can live with the limitations, use the free version. Otherwise, purchase the Professional version. Juan T. Llibre, asp.net MVP asp.net faq : http://asp.net.do/faq/ foros de asp.net, en espaņol : http://asp.net.do/foros/ ====================================== "S_K" <steve_kershaw@yahoo.com> wrote in message news:83444cf9-24af-4697-87f1-631fb2177329@h11g2000prf.googlegroups.com... On Mar 26, 8:53 am, "Aidy" <noem...@noemail.xxx> wrote: > Don't automate Office from a web app, it isn't supported. > > Beyond that you need to ensure Office is actually installed on your web > server and the machine you are compiling on. > > "S_K" <steve_kers...@yahoo.com> wrote in message > > news:9513772c-3a69-491a-a4e7-0cf2efcafa5a@e23g2000prf.googlegroups.com... > > > > > Hi, > > > I have a need to read data from an Excel spreadsheet using ASP.NET > > (C# ). The data is then displayed in various locations on the web > > site. This should be very simple and I have been following David > > Hayden's excellent article on this (http://davidhayden.com/blog/dave/ > > archive/2006/05/26/2973.aspx) but I get type or namespace could not be > > found errors when I build. I've tried to include a reference for the > > following: > > > System.Data.Odbc.OdbcFactory > > System.Data.OleDb.OleDbFactory > > System.Data.SqlClient.SqlClientFactory > > > However I can't find any references for the above namespaces in the > > "Add Reference" .Net or COM sections. > > > Is there anyway to easly read the cells from an Excel speadsheet? > > > Thanks in advance so much for your help! > > > Steve- Hide quoted text - > > - Show quoted text - So how do I collect data from Excel if I shouldn't automate Office from a web application? Should I be creating an .exe app? |
| All times are GMT. The time now is 08:48 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.