Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel 2007 and FormatConditions code
Message
De
24/02/2009 02:23:17
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01383370
Message ID:
01383678
Vues:
40
>> Unfortunately it didn't work for Excel 2007, I still don't see the green highlight. It works OK for Excel 2003.

I only have Excel 2007, this is my entire code and when I type "TOTAL" in any cell in Column A I get the highlight (checked down to cell A60487 then got bored :-) )
#INCLUDE excel9.h

loExcel=CREATEOBJECT("Excel.Application")
loExcel.Workbooks.ADD()
loPage=loExcel.Workbooks(1).Worksheets(1)
loExcel.Columns("A:A").SELECT
loExcel.SELECTION.FormatConditions.DELETE
loExcel.SELECTION.FormatConditions.ADD(xlExpression,, '=UPPER(Left($A1,5))="TOTAL"')

WITH loExcel.SELECTION.FormatConditions(1)
.FONT.Bold = .T.
 .Interior.ColorIndex = 4
ENDWITH
loExcel.Visible=.T.

RETURN
Can you seperate out more of you code and I can try and run it?

Gary.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform