>Hi Folks
>Has anyone had difficulty setting the 'Rows Scanned' option on the Excel ODBC driver to 0 (zero). The defaul is 8 and the range is 1-16 and 0. Zero is documented but I cannot get the ODBC Administrator to accept it.
>
>The problem is that after 16 (max) empty cells, the driver returns null data for a column. If data should happen to begin on the 17+ row, too bad.
>
>I have a multi column Worksheet and I am importing the data to Fox. Not all columns have data on row 1.
>
>Has anyone had a similar problem or perhaps knows of a newer driver. The driver I am using is ODBCJT32.DLL, dated 12/2/96.
>
>Thanks
Hello,
ODBC is already difficult to use with plain and organised data structures
(SQL engines). I would definitely avoid using it for data imports of
thosespreadsheet or other untidy formats.
My recent experience has been that Excel is a splendid OLE server including
for data import (where i test for column existence, data integrity and so on)
try this :
LOCAL cFileName
cFileName = GETFILE("xls")
SET MESSAGE TO "opening Excel OLE"
oExcel=getobject(cFileName)
SET MESSAGE TO "cells read starting"
FOR i=1 TO 10
FOR j=1 TO 100
v = oExcel.Sheets(1).Cells(i,j).Value
ENDFOR
SET MESSAGE TO ALLTRIM(STR(i*100))+ " cells read"
ENDFOR
If you use VFP 5 you can even use the elegant FOR EACH instruction
ON any Excel RANGE instead for those 2 clumsy FOR loops.
Only pb : this is obviousy not as fast as direct ODBC import.
François
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement