Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel 2007 and FormatConditions code
Message
 
 
To
24/02/2009 11:17:34
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01383370
Message ID:
01384660
Views:
48
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
Previous
Reply
Map
View

Click here to load this message in the networking platform