Quote:
|
Originally Posted by Riax
hi,
i want to read the contents of an xls file and further write those to an access db.but i got a problem reading the file,it doesn't work with
FileSystemObject 's reading file, like f.ReadAll and..
what's the problem with it & what the solution..
any help will be appriciated.
thanks in advance.
riax
|
u dont need to use FileSystemObject
treat xls file as a db file and use the following connection string
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DBQ=" & Server.MapPath(".") & "\your_file.xls;DefaultDir=" & Server.MapPath(".") & ";Driver={Microsoft Excel Driver (*.xls)};DriverId=790;FIL=excel 8.0;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5 ;ReadOnly=0;SafeTransactions=0;Threads=3;UID=admin ;UserCommitSync=Yes;"
Regards,
Mashal