void __fastcall FillColorCell(int row, int col, int ColorIndex)
{
try
{
Variant cell, column, interior;
cell = xlSheet.OlePropertyGet("Cells", row, col);
column = cell.OlePropertyGet("Columns");
interior = column.OlePropertyGet("Interior");
interior.OlePropertySet("ColorIndex", ColorIndex);
interior.OlePropertySet("Pattern", 1); //1 - xlSolid
}
catch(...)
{
}
}
|
LIST
'Borland' 카테고리의 다른 글
| Excel ColumnWidth 변경 매크로 (0) | 2010.02.01 |
|---|---|
| StringGrid 셀 병합 및 표시방법 세팅 (0) | 2010.01.22 |
| Excel 설치 여부 확인 (0) | 2010.01.19 |
| Excel의 셀에 이미지 삽입 방법 (0) | 2010.01.19 |
| Excel에서 특정 열의 타입을 지정해주는 방법 (0) | 2010.01.19 |