I am importing data from excel sheet to my sql server database in c#.And below is my connection string for that -
var OleDbcon = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;");
But this is not working on machines where MS Office is not installed.
And for this issue I have changed my connection string like this :
var OleDbcon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=Text;");
But still I am not able to import the data.Can any one help me out on this ?
I am importing data from .xls files only.