Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Dynamically reading Excel column

$
0
0

I want to import data from Excel to object dynamically. How to read the data in Excel based on columns? 

For example, 

 DataRowCollection drc = filteredRows.Rows;
 int totalRows = drc.Count;

 List<DynamicDataControllerModel.PurchaserExcel> target = new List<PurchaserExcel>();

  for (int r = 0; r < totalRows; r++)
  {
DynamicDataControllerModel.PurchaserExcel pe = new PurchaserExcel(); pe.PurchaserIC = drc[r].Field<string>("Purchaser IC No"); <-- is there a way to make it more dynamic? like without caption sensitivity }

Thank You


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>