Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi frds,

I am read the Excel file in oledb connection., In my local path its work fine..,

but in i am mention server path is not working i am getting error please check the code..,

MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; Excel 12.0 Xml;HDR=YES; Data Source = 'C:\\CALIBRATION_FABTECH\\Calibration_Alert\\CALIBRATION STATUS.xls'; ");

Server Path:

MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; Excel 12.0 Xml;HDR=YES; Data Source = '@:\\serverName\\CALIBRATION_FABTECH\\Calibration_Alert\\CALIBRATION STATUS.xls'; ");
Posted
Comments
Kornfeld Eliyahu Peter 25-Dec-14 1:53am    
What is the error?
What @: before server name is?
safihur Rahuman 25-Dec-14 2:38am    
Can Not find the path..,
Kornfeld Eliyahu Peter 25-Dec-14 3:30am    
Remove that @: from the beginning and check again...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900