| Microsoft | Articles | Forums | Groups |
| C# .NET |  |  |  |
| VB.NET |  |  |  |
| Visual Studio .NET |  |  |  |
| ADO.NET |  |  |  |
| Xml/Xslt |  |  |  |
| VB 6.0 |  |  |  |
| .NET CF |  |  |  |
| GDI+ |  |  |  |
| LINQ |  |  |  |
| Deployment |  |  |  |
| Security |  |  |  |
| FoxPro |  |  |  |
| Silverlight / WPF |  |  | |
| Entity Framework |  |  | |
| RIA Services |  |  | |
|
| Web Programming | Articles | Forums | Groups |
| JavaScript |  |  | |
| ASP |  |  | |
| ASP.NET |  |  |  |
| Web Services |  |  |  |
|
| Non-Microsoft | Articles | Forums | Groups |
| NHibernate |  |  | |
| Perl |  |  | |
| PHP |  |  | |
| Ruby |  |  | |
| Java |  |  | |
| Linux / Unix |  |  | |
| Apple |  |  | |
| Open Source |  |  | |
|
| Databases | Articles | Forums | Groups |
| SQL Server |  |  |  |
| Access |  |  |  |
| Oracle |  |  | |
| MySQL |  |  | |
| Other Databases |  |  | |
|
| Office | Articles | Forums | Groups |
| Microsoft Excel |  |  |  |
| Microsoft Word |  |  |  |
| Microsoft Powerpoint |  |  |  |
| Publisher |  |  |  |
| Money |  |  |  |
|
| Operating Systems | Articles | Forums | Groups |
| Windows 7 |  |  | |
| Windows Server |  |  |  |
| Windows Vista |  |  |  |
| Windows XP |  |  |  |
| Windows Update |  |  |  |
| MAC |  |  | |
| Linux / UNIX |  |  | |
|
| Server Platforms | Articles | Forums | Groups |
| Share Point |  |  |  |
| BizTalk |  |  |  |
| Site Server |  |  |  |
| Exhange Server |  |  |  |
| IIS |  |  |  |
| Transaction Server | | |  |
|
| Graphic Design | Articles | Forums | Groups |
| Macromedia Flash |  |  | |
| Adobe PhotoShop |  |  | |
| Microsoft Expression |  |  |  |
|
| Other | Articles | Forums | Groups |
| Subversion / CVS |  |  | |
| Ask Dr. Dotnetsky |  |  | |
| Active Directory |  |  |  |
| Networking |  |  | |
| Uninstall Virus |  |  | |
| Job Openings |  |  | |
| Reviews |  |  | |
| Search Engines |  |  | |
| Resumes |  |  | |
|
|
|
|
| Open Microsoft Excel spreadsheet with ADO.NET |
| Printer Friendly Version |
|
| If your spreadsheet is set up to look like a table, you can easily connect and
work with it using SQL. Here's a quick sample to get you started. |
|
|
|
|
If your spreadsheet is set up to look like a table, you can easily connect and work with it using SQL. Here's a quick sample to get you started. If you would like a more elaborate example of how to use ADO.NET with Excel including updating data, check out this article: http://www.eggheadcafe.com/articles/20021221.asp strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\TEMP\TEST.XLS;Extended Properties=Excel 8.0;"; string sList="myspreadsheetname"; OleDbConnection oConn = new OleDbConnection(); oConn.ConnectionString = strConn; oConn.Open(); OleDbDataAdapter oCmd = new OleDbDataAdapter("SELECT * FROM [" + sList + "$]", oConn); DataSet oDS = new DataSet(); oCmd.Fill(oDS); foreach(DataRow oRow in oDS.Tables[0].Rows) { Response.Write("Row: " + oRow["COLUMNNAME"].ToString() + "<br>"); } if (oConn.State == ConnectionState.Open) { oConn.Close(); }
|
| Submission Date: 9/23/2005 2:47:53 PM |
| Submitted By: Robbe Morris |
| Email: |
| My Home Page: http://www.robbemorris.com |
| My Biography |
| Robbe has been a Microsoft MVP for C# since 2004. He is also the co-founder of EggHeadCafe. Robbe has extensive experience with web technologies, .NET, C#, CTI based applications, system administration, .NET Compact Framework, and data modeling. In his spare time, he blogs from time to time at http://robbemorris.blogspot.com |
|
|
|