Horje
Reading Excel files from C# Code Example
Reading Excel files from C#
var fileName = string.Format("{0}\\fileNameHere", Directory.GetCurrentDirectory());
var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", fileName);

var adapter = new OleDbDataAdapter("SELECT * FROM [workSheetNameHere$]", connectionString);
var ds = new DataSet();

adapter.Fill(ds, "anyNameHere");

DataTable data = ds.Tables["anyNameHere"];




Csharp

Related
iframe Code Example iframe Code Example
update multiple records with entity framework Code Example update multiple records with entity framework Code Example
c# replace multiple characters Code Example c# replace multiple characters Code Example
unity string lowercase Code Example unity string lowercase Code Example
get what week of the month c# Code Example get what week of the month c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11