Uderc programming article aggregator sites
Index -> C# DataTable to Excel

C# DataTable to Excel

Advertisement

How do I fill an Excel spreadsheet with the contents of a DataTable? (C#, OleDb)

The following fills a DataTable with the contents of an Excel spreadsheet.     oledbCmd.CommandText = "SELECT * FROM [" + stSheetName + "$]";     DataTable dtDataTable = new DataTable();     using (OleDbDataAdapter oledbAdapter = new O

Exporting and Importing a table in Lookout 6.0.2 using Office 2007

I am exporting a table to Excel 2007 from Lookout 6.0.2 so I can make changes and then import the table with changes back into Lookout. I have done this in the past with Excel 2003 and have had no problems. When I export the table the file that is cr

Create excel file in document library from the data in datatable

Hi , I want to generate files dynamically and have then saved to my documetn library instead of  some location on the  harddisk. I want to generate and excel file  which will read data from the sharepoint list. Form that data excel will be genereated

After Export to Excel File error while opening using xmlwriter in silverlight

Can one help me in fixing following issue after to export to excel had done iam getting following error message  "The file you are trying to open, 'test.xls', is in a different format than specified by the file extension. Verify that the file is not

How to open and read Excel Sheet from SharePoint 2013 Document Library using C# Visual Studio 2012

Hi, To achieve these are the steps that I had followed : 1. Add the document Library path into Central Admin -> Application Mgmt -> Manage Service App -> Excel Service App -> Trusted File Locations 2. Add Documnet Library link to Trusted Conne

Save and close excel file using C#.

I am not sure why I get the following error for the below code.  Everything seems to work otherwise. Error found: System.Runtime.InteropServices.COMException (0x8002000B): Invalid index. (Exception from HRESULT: 0x8002000 B (DISP_E_BADINDEX)) Applica

Export to Excel using JSF lifecycle.?

Hello, I am having Export functionality in my application, When I do export on click of "Export" button (h:commandButton) it works fine and it shows the excel file and allow me to save in my computer. After that when I call another functionality

Excel File Error After Using SaveAsDialog in C#

Hello, I have a project where I am trying to use SaveFileDialog. My code runs fine and saves the file to the directory that I choose. The problem is when I try to open the file I receive an error from Excel stating  "Excel cannot open the file Test_F

Size of Exported Excel file is very large

Hi, I have a report that has around 10000 rows and 5 columns. When I export to excel, the excel file is very big, around 15MB. But If the file is opened, and saved again , the size reduces to around 13MB. Any suggestions on how to reduce the file siz