Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Sheet Formatting
Message
 
 
À
06/03/2006 14:42:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01087027
Message ID:
01101821
Vues:
10
>>>That is what I understand, but I can format only the rows with [Total] not the numbers :o)
>>
>>What can you do and how? E.g. show some code.
>
>#define xlLastCell    11
>#define xlCellValue    1
>#define xlEqual        3
>
>LOCAL oExcel AS Excel.Application
>oExcel = CREATEOBJECT([Excel.Application])
>
>oExcel.Workbooks.Open([d:\book1.xls])
>oExcel.Visible = .t.
>oExcel.Range([A1],;
>             oExcel.Selection.SpecialCells(xlLastCell)).Select
>oExcel.Selection.FormatConditions.Delete
>oExcel.Selection.FormatConditions.Add(xlCellValue, xlEqual,"Total")
>With oExcel.Selection.FormatConditions(1).Font
>     .Bold = 1
>     .Italic = 0
>     .Strikethrough = 0
>EndWith
>
>But I couldnt made it works with whole selection and IF the cell contains [Total] not just equal to it.

This doesn't work for me. Should I try to PADR to the whole column length (100)?
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform