Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FVP And Excel Automation Problem
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01182773
Message ID:
01182775
Views:
9
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform