Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel
Message
 
À
09/10/2007 11:10:02
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Windows
Catégorie:
Informatique en général
Titre:
Re: Excel
Divers
Thread ID:
01259745
Message ID:
01259767
Vues:
18
>Is there a way to have a cell, or cells, shaded depending on if the date in a cell is either the 1st or the 16th day of the month?

If you are doing the writing of the data to excel, here's an example:
SELECT tmpexcel
GO TOP
SCAN 
   WITH oRange
     .Columns[1].value = ALLTRIM(sc_parttime)
      .Columns[2].value = ALLTRIM(sc_name)
      .Columns[3].value = ALLTRIM(discipline)
      .Columns[4].value = cWkJob1
      *---
      *--- Excel doesnt handle all RGB backcolors that VFP does.
      *--- You can select a lite purple and it can show up in
      *--- excel as yellow.  So instead i recorded a macro in 
      *--- excel where i color some cells and then view the macro
      *--- to see what the "colorindex" is.
      *---
      nColFull = 38   && fullday off
      nColPart = 8    && partial day off
      *---
      IF SUBSTR(UPPER(cWkJob1),1,3) = "VAC"
         IF "PARTIAL" $ UPPER(cWkJob1)
	   .Columns[4].interior.colorindex = nColPart				
	ELSE
     	   .Columns[4].interior.colorindex = nColFull		
	ENDIF
      ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform