Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FVP And Excel Automation Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01182773
Message ID:
01182775
Vues:
10
>I am having a problem with Visual Foxpro and Excel using automation.
>
>I have read Microsoft Office Automation with Visual Foxpro and struggle with a concept.
>
>When trying to refrence a cell I cannot build a refrence using the loop counters as a refrence to it. Confusing I know and example is better.
>
>assuming
>
>oExcel = CreateObject("Excel.Application")
>oExcel.Visible = .F.
>oBook = oExcel.WorkBooks.Open("C:\whatever.xls")
>oSheet = oBook.ActiveSheet
>
>Why will
>
>REPLACE whatever WITH oSheet.Range("C13").Value
>
>Work but
>
>lnrow = 13
>Replace whatever WITH oSheet.Range("C" + lnrow).Value
>
>Fail with a operator/operand mismatch
Replace whatever WITH oSheet.Range("C" + ALLTRIM(STR(lnrow))).Value
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform