Posts tagged: asp.net and excel

Feb 04 2010

the connection for viewing your linked microsoft excel worksheet was lost. error 3620

Check below steps to avoid above error

Step 1:

Use below connection for Office 2007 Excel files

string connectionString = “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\user.xls;Extended Properties=\”Excel 8.0;HDR=YES;\“”;

user.xls is Excel file Name (Database name)

Use below connection for Office 97-2003  Excel files

string connectionString = “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\user.xls;Extended Properties=Excel 8.0;”;

step2:

Before adding records from asp.net form to excel close the excel file

After adding records then open and view added record.

Example for insert and display records from excel using asp.net

http://www.codeforasp.net/insert-and-display-data-into-excel-using-asp-net.html

Alibi3col theme by Themocracy