constring = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source='" & mypath & "';Extended Properties='Excel 12.0 Xml;" & hdr & ";IMEX=1;'"
Dim p_sqlAdapter As OleDbDataAdapter = New OleDbDataAdapter(vbNullString, New OleDbConnection(constring))
p_sqlAdapter.SelectCommand.CommandText = “select * from namerange”
Dim ds As DataSet = New DataSet("datasetname")
p_sqlAdapter.Fill(ds)
p_Datatable = ds.Tables(0)
|
Recommended approach – exe will perform automatic configuration
Please find the patch setup here:
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment Please find the patch assemblies alone from:
Please find the NuGet’s from the below location:
|
|
foreach (System.Data.DataRow row in collection.Rows)
{
ExpandoObject expandoObject = new ExpandoObject();
dynamicCollection.Add(expandoObject);
foreach (DataColumn column in collection.Columns)
{
var dictionary = ((IDictionary<string, object>)(expandoObject));
dictionary[column.ColumnName] = row[column] is DBNull ? null : row[column];
}
}
|