Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel cell value update automation?
Message
 
 
À
12/09/2005 10:43:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01048762
Message ID:
01048780
Vues:
17
Thanks Cetin,

I'll Start my debugger again and walk down to this level - I get no errors but my spreadsheet does not contain the new values. I was suspecting the OpenWorkBooks params were off as I do not have information on the meanings, I believe that lets me open the spreadsheet and ignore workbook links...

>Edgar,
>Your code doesn't show where it might be failing clearly. Duplicating your problem part works:
>
>oExcel = createobject('Excel.Application')
>with oExcel
> .Workbooks.Add
> With .ActiveWorkbook.ActiveSheet
> 	lcAddress = "A"+Ltrim(Str(199))
> 	lcDate = Dtoc(Date())
> 	.Range(m.lcAddress).Value = Ctod(m.lcDate)
> endwith
> .Visible = .t.
>EndWith
>
>
>You have quit at the end. Maybe you're not setting it to visible and closing w/o saving changes?
>Cetin
>
>>What is missing for enforement of value in Excel Spreadsheet...
>>Here's my partial code
>>
>>   oExcel=CREATEOBJECT("Excel.Application")
>>   With oExcel
>>      .DisplayAlerts= .F.
>>         .WorkBooks.Open(ALLTRIM(Charttabs.Sheet),0)
>>         .Sheets(ALLTRIM(Charttabs.Tab)).Select()
>>         DO PopulateExcelArray
>>      .Quit
>>   EndWith
>>   Release oExcel
>>
>>Procedure PopulateExcelArray
>>... && no problem retrieving information from spreadsheet
>>      cRange= "A"+ AllTrim(Str(nRow)) && Column A4
>>      .Range(cRange).Select()
>>      &cArray(nRow,iColumn)= AllTrim(DTOC(.Range(cRange).Value))
>>...
>>   DO ProvideDesc
>>EndProc
>>
>>PROCEDURE ProvideDesc
>>... && no problem getting a description into my array
>>   cDescription= cDescription+ ALLTRIM(IIF(ISNULL(.Range("AE3").Value)," ",AllTrim(TRANSFORM(.Range("AE3").Value))))
>>   &cArray(2,26)= cDescription
>>   DO UpdateSpreadsheet
>>
>>PROCEDURE UpdateSpreadsheet
>>... && no problem to identify new values for spreadsheet
>>            sRowID=ALLTRIM(STR(&cArray(3,1))
>>...
>>            sAE= CHRTRAN(CHRTRAN(sAE,CHR(9),""),"-","")
>>... && What must be added to enforce this cell, say A199, to be populated?
>>            IF !EMPTY(sA)
>>               cCell="A"+sRowID
>>               .Range(cCell).Select()
>>               .Range(cCell).Value= CTOD(sA)
>>            ENDIF
>>
>>
>>Do I have an object.update missing? Where can I get a list of Excel Object interactions?
>>
>>TIA
Edgar L. Bolton, B.S. B.B.A.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform