For Excel 2010 Use Below Connection String.
- String StrConn;
- StrConn ="Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
- + Excelpath +";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
For Excel 2003 Use Below Connection String.
- String StrConn;
- StrConn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
- + Excelpath +";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
Use this function to convert excel to csv: