Hi Guys
I am writing an application where by I need to export data from a data table (already populated with data from SQL Server).
I have never done this before so not sure where to start. Assuming I already have a connection to a spreadsheet called Orders.xls.
What code do I need to take data from the data table and insert it into a specific cell in the spreadsheet?
E.g.
for (int c = 0; c < dt.Rows.Count; c++)
{
trip = (dt.Rows[c]["TRIP"]).ToString();
// Here I want to set it that cell A1 in the spreadsheet must have trip in it
}
I have numerous records from which certain field need to populate different cells in the spreadsheet.
PLEASE any advice will greatly be appreciated.
Have a great weekend!
I am writing an application where by I need to export data from a data table (already populated with data from SQL Server).
I have never done this before so not sure where to start. Assuming I already have a connection to a spreadsheet called Orders.xls.
What code do I need to take data from the data table and insert it into a specific cell in the spreadsheet?
E.g.
for (int c = 0; c < dt.Rows.Count; c++)
{
trip = (dt.Rows[c]["TRIP"]).ToString();
// Here I want to set it that cell A1 in the spreadsheet must have trip in it
}
I have numerous records from which certain field need to populate different cells in the spreadsheet.
PLEASE any advice will greatly be appreciated.
Have a great weekend!
Comment