Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending data to Excel from different tables
Message
De
27/04/2006 21:32:46
 
 
À
27/04/2006 12:55:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01116910
Message ID:
01117367
Vues:
17
>>>>Using VFP8. I need to append data from 10 differents tables having different structures into 1 Excel sheet. anyway to do this other than inserting a cell at the time?
>>>
>>>I'm also using _vfp.DataToClip(,,3) - though I'm usually removing the header line from _cliptext, as my field names would just confuse the end user - I usually have template sheets and paste into predefined areas, which already have neatly formatted header rows. Something like this:
>>>
>>>
set memowidth to 1023
>>>cFirstLine=mline(_cliptext,1)
>>>_cliptext=strtran(_cliptext, cFirstLine+chr(13),"")
>>>oRange.PasteSpecial()
>>>
>>>Now the "multiple tables" part begs knowing some details: do they need to be on the same page (in which case you may have to consolidate them into a single cursor first), or can they be one page at a time. In the latter case, Naomi's way is the simplest.
>>
>>I think he wants them in the same sheet. And I don't think the data could be combined into one cursor.
>
>In that case, paste one, go a few (Excel) rows below that, paste next table, calculate the next blank row, go a few rows below that, paste next...

Dragan, Naomi

I was able to add the tables into one sheet using VFPOLEDB by doing what Dragan suggested. isert one table then skip few lines and insert another table. using VFPOLEDB worked fine because I have the tables in one database.

I needed to have them on one sheet so we can use Oracle plsql and parse the file easily.

Thanks
Mo
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform