Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disecting an Excel Worksheet
Message
De
07/03/2009 09:32:26
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Disecting an Excel Worksheet
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01386393
Message ID:
01386393
Vues:
96
Hi All...

I have an Excel worksheet which can have many columns. The header column has data which correspond to the field names in a DBF table. How can I identify which column #'s are ITEM & PRICE and whether thay contain character or numeric data ?

Listed below is my attempted code. Any help is greately appreciated.

Thank You in advance..

Raz
LOCAL oExcel, lcItem, lnCost
lcFile = "HITACHI.XLS"

oExcel = CREATEOBJECT("Excel.Application",)
oExcel.Workbooks.Open(lcFile)
oExcel.Workbooks(1).Sheets(1).Select()
oExcel.Cells.Select
mnLastRow = oExcel.activesheet.UsedRange.ROWS.COUNT
rr = oExcel.activesheet.UsedRange.ROWS.COUNT
mcLastRow = ALLTRIM(STR(mnLastRow))

lcItem = oExcel.Cells(rr,??).value		&& oExcel.Cells(rr,08).value
lnCost = oExcel.Cells(rr,??).value		&& oExcel.Cells(rr,12).value
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform