0
votes

I have an excel sheet (File1.xls). Before processing the File1.xls data, I need to add Column headers into it or create a new excel file (File2.xls) with column headers and copy File1.xls data into it.

Currently I am using OleDbConnection to read data from the excel sheet and loading it into a Datatable using OleDbCommand, OleDbDataAdapter. But I couldn't find any way to add column headers into an excel file.

Thanks in advance for the solution?

1

1 Answers

1
votes

U need to use a third party libary like ExcelLibary supports .xls or Epplus supports .xlsx. Or you can COM Interop which needs excel installed.