siva nathan

siva nathan

  • 950
  • 828
  • 235.6k

loop through excel package list assign data table dynamically in c#

Mar 17 2021 2:18 PM
Hi all,
 
am having an excel sheet neet to import in asp.net core and save the data in sql server.
i have readed the excel sheet need to convert that excel sheet columns into key,value pair like below
 
  ID Name Age Address
 1 john 12 Delhi
 2 rohit 14 mumbai
 
need to convert above table columns into key and value pair dynamically based on rows and columns 
my expected output is below
 Fieldname value
 ID 1
 Name john
 Age 12
 Address delhi
 
how can i achieve in c# dynamically 
 

Answers (1)