I need to import data from an excel file, but some field is a merged cell.
How can I determine if a field is merged or not, and how many cells are merged together in that field?
My code is like this:
Dim Conn, DBPath ,Rs
Set Conn = Server.CreateObject("ADODB.Connection")
DBPath = "Driver={Microsoft Excel Driver (*.xls)}; DBQ=" & Server.MapPath("program.xls")
Conn.Open Driver & DBPath
Sql="Select F1, F2 From [Sheet1$]"
Set ODBCrs=Conn.Execute(Sql)
while Not ODBCrs.EOF
conn2.execute("insert into....")
ODBCrs.MoveNext
wend
ODBCrs.Close
Conn.Close
The data is like this:
Category A
name 1 desc 1
name 2 desc 2
Category B
name 3 desc 3
name 4 desc 4
Thanks a lot!!