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