From MSSQL or ORACLE Into Excel
Category:C#, VB.NET, ASP.NET
Version Compatibility: Visual Basic.NET
This is a sample snippet to convert an SQL query directly into an Excel spreadsheet without reference to the version of MS Office. This is available for other database types by simply changing the provider.
Instructions: Copy the declarations and code below and paste directly into your VB project.