Je voudrais savoir comment changer la couleur de fond d'une cellule excel.
Version imprimable
Je voudrais savoir comment changer la couleur de fond d'une cellule excel.
salut
voila un exemple valant mieux qu'un long discourt
@+ PhilCode:
1
2
3
4
5 ExcelApp.Range[BaseCell.Offset[row,Col],BaseCell.Offset[row,ColDeb]].Select; ExcelApp.Selection.HorizontalAlignment := xlCenter; ExcelApp.Selection.Font.Bold := TRUE; ExcelApp.Selection.Interior.ColorIndex := 34; // bleu pâle ExcelApp.Selection.Interior.Pattern := xlSolid;
Salem
Moi, j'ai trouvé ça :
La dernière ligne de ce code constitue ce que tu veux toi 8)Code:
1
2
3
4
5
6
7
8
9 WBk := ExcelApplication.Workbooks.Add(Template, lcid) ; WS := WBk.Worksheets.Item[1]; WS.Cells.Item[1, 1].Value := 'Valeur' ; WS.Cells.Item[1, 1].font.size := '12'; WS.Cells.Item[1, 1].font.bold := True; WS.Cells.Item[1, 1].font.italic := True; WS.Cells.Item[1, 1].font.color := clRed; WS.Cells.Item[1, 1].Interior.Color := clBlack;