Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel 2007 and FormatConditions code
Message
 
 
À
24/02/2009 11:17:34
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:
01384660
Vues:
47
Hi Gary,

I want to also thank Borislav here. I asked him off-line to help me check it with Vista and Office 2007.

His suggestion is to change

* loExcel.SELECTION.FormatConditions.ADD(xlExpression,, '=UPPER(Left($A1,5))="TOTAL"')

to
loExcel.SELECTION.FormatConditions.ADD(xlExpression,, '=UPPER(LEFT(RC1;5))="TOTAL"') && Just change [;] to [,] if you need it.

I don't have Vista here near by to try, so may be someone else can try it just in case.

Thanks again to both of you.

>Naomi,
>
>Your problem is the format you are saving the spreadsheet in:
>
>loExcel.ActiveWorkbook.SAVEAS(tcXLSFileName, 39)
>
>
>39 = Excel5, I don't know if Excel5 supported conditional formatting but Excel 2007 clearly thinks is does not as if you check the file before this line then your conditional formatting is there. Imemdiately afterwards there is no conditional formatting anywhere in the workbook.
>
>If you use Excel8 format (56) , then conditional formatting is retained.
>
>
>loExcel.ActiveWorkbook.SAVEAS(tcXLSFileName, 56)
>
>
>
>Gary.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform