Home > Net >  Questions about asp connected to the.xls files
Questions about asp connected to the.xls files

Time:09-25

Var conn=Server. CreateObject (" ADODB. Connection ");
Conn. Open (" Provider=Microsoft. Jet. The OleDb. 4.0; Extended Properties=8.0 Excel; Data Source=+ "Server. MapPath (" zs1216n1. XLS"));
Bosses, require that the asp connected to.xls files, but the use of the above code, always show less braces or external form is not the desired format,
Var connnew=Server. CreateObject (" ADODB. Connection ");
Connnew. Open (" Provider=Microsoft. Ace. The OleDb. 12.0; Extended Properties=12.0 Excel; Data Source="+ Server. MapPath (" test1. XLSX"));
But the use of the above code connection XLSX file but there was no problem!
One who help me ah

CodePudding user response:

The Provider=Microsoft. Jet. The OleDb. 4.0; Extended Properties=8.0 Excel; Data Source=+ "Server. MapPath (" zs1216n1. XLS")
Change
"The Provider=Microsoft. Jet. The OleDb. 4.0. Extended Properties=8.0 Excel; Data Source= + " Server MapPath (" zs1216n1. XLS")

CodePudding user response:

reference 1st floor github_36000833 response:
Provider=. Microsoft Jet. The OleDb. 4.0; Extended Properties=8.0 Excel; Data Source=+ "Server. MapPath (" zs1216n1. XLS")
Change
"The Provider=Microsoft. Jet. The OleDb. 4.0. Extended Properties=8.0 Excel; Data Source= + " Server MapPath (" zs1216n1. XLS")

no attention, but still show the external table is not the default format

CodePudding user response:

Asp is outdated (2002 Asp.Net) nearly 20 years,

CodePudding user response:

reference github_36000833 reply: 3/f
asp have been out of date (2002 Asp.Net) nearly 20 years,

Yes, the teacher asked us to do this with asp
  • Related