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: