>Hi,
>
> I would like to import data to Excel using OLE object. However, I don't
>know much about the structure of the Excel in terms of object. I only know
>how to create an excel and add a cell value in it using OLE object.
> So I would like to know is there any help file for describing how to
>import data into Excel using OLE object.
>
>Thanks,
>Agnes
Hi Agnes,
While ago I developed & posted here in download section file named REP2EXCEL.
It is set of wrapper classes for common OLE automation calls + reporting class. They can do this kind of stuff.
Exporting/reporting/writing to excel from VFP.
It might be little bit slow for exporting huge tables, but is extremely powerfull for complex Exports/Imports to/from excel.
Eg.
oXL.make_cell(3,20,5, 'Hello' )
will write word 'Hello' into 3rd sheet, 20th row and 5th column
of a desired excel file
or
oXL.table_in_section(3,21,5, 'MyTable',cDelimitedFieldsList)
will write specified fields of your cursor/table into section specified by given coordinates.
Full source is included so - suit yourself.
Rgds++