Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP/Excel Automation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00534454
Message ID:
00534502
Vues:
14
>I haven't done this for awhile so I am at a loss as to how to implement a do while that would create the proper row increment into excel. If anyone could return a few lines a code it would be appreciated.
>
>B.
Here's a snip from a routine that uses oExcelRow as an Excel row incrementor
lnExcelRow=4
do while !eof() AND ferc_numb+section+sort_prod+line_prod<=LastRecord
FERCListings.MSG.Caption=alltrim(MasterKey)+[ ]+trim(origin)+[ ]+trim(destinatio)
if MasterKey#ferc_numb+section+sort_prod+line_prod
   MasterKey=ferc_numb+section+sort_prod+line_prod
   =seek(MasterKey,[FERCMaster],[ferc_mast])
   .Cells(lnExcelRow,1).Value=[FERC Tariff No.]+str(val(ferc_numb),5)
   .Cells(lnExcelRow,5).Value=iif(val(FERCMaster.ferc_old)>0,[(Cancels FERC No.]+str(val(FERCMaster.ferc_old),5)+[)],[])
   .Cells(lnExcelRow,9).Value=BuildProductDescription(Line_Prod)
   store 7 to .Cells(lnExcelRow,9).font.Size
   store .t. to .Cells(lnExcelRow,1).font.bold,.Cells(lnExcelRow,4).font.bold
   store 12 to .Cells(lnExcelRow,1).font.Size,.Cells(lnExcelRow,4).font.Size
   CheckOrigin=[..force]
   lnExcelRow=lnExcelRow+1
endif
The ".Cells(lnExcelRow,1)" is a row,column pointer. HTH!
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform