S
SN
Hi,
I want to write an excel file on server from a client connection with
following code:
string ConnString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +
Server.MapPath("../../ExcelTemplate/PrevalenceReportDownloadv2TEMPLATE.xls")
+ @";Extended Properties=""Excel 12.0;HDR=NO;""";
OleDbConnection cn = new OleDbConnection(ConnString);
cn.Open();
But, it fails to open the connection, giving following error:
System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is
not registered on the local machine
One thing here to note down is, the server has no office environment.
Does it need Office installed as a prerequisite ?
Or there is some other problem?
Hoping for a quick response.
Thanks for your help.
-Sulakshana.
I want to write an excel file on server from a client connection with
following code:
string ConnString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +
Server.MapPath("../../ExcelTemplate/PrevalenceReportDownloadv2TEMPLATE.xls")
+ @";Extended Properties=""Excel 12.0;HDR=NO;""";
OleDbConnection cn = new OleDbConnection(ConnString);
cn.Open();
But, it fails to open the connection, giving following error:
System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is
not registered on the local machine
One thing here to note down is, the server has no office environment.
Does it need Office installed as a prerequisite ?
Or there is some other problem?
Hoping for a quick response.
Thanks for your help.
-Sulakshana.