Apr 17, 2012 10:15 AM|mannnn|LINK
Thanks for reply:)
I am not getting the same error now. This time I used the below mentioned connection string
OleDbConnection DBConnection = new OleDbConnection(@"PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=" + datasource + ";Extended Properties='Excel 12.0 Xml;HDR=YES;IMEX=1'");
But now I am getting a new error
Microsoft Excel cannot access the file 'C:\trng\abc.xslx'. There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.
for this I have killed "EXCEL.EXE" file from task manager but still it gives above mentioned error.
I seriously dont know what to do:(