Conditional Formating
Posted: Wed Oct 07, 2009 1:28 pm
Hello I'm trying to use Conditional Formating
I'm using Borland C++ Builder and XLSReadWriteII 3.0
My sorse code is following:
//**********************************************************************************************************************************//
XLS->Sheet[0]->FillRandom("A1:I10",300); //Add somw random numbers
XLS->Sheet[0]->ConditionalFormats->Add();
XLS->Sheet[0]->ConditionalFormats->Add()->Areas->Add(0,0,9,9);
XLS->Sheet[0]->ConditionalFormats->Add()->Condition1->Formula1="100";
XLS->Sheet[0]->ConditionalFormats->Add()->Condition1->Formula2="200";
XLS->Sheet[0]->ConditionalFormats->Add()->Condition1->CompOperator=coBetween;
XLS->Sheet[0]->ConditionalFormats->Add()->Condition1->FmtPattern->ForeColor=xcRed;
//**********************************************************************************************************************************//
In output XLS sheet it fills A1:I10 with random values from 0 to 300, but it does not do any frmating (does not color in red cells with values between 100 and 200)
What i'm doing wrong ??
I'm using Borland C++ Builder and XLSReadWriteII 3.0
My sorse code is following:
//**********************************************************************************************************************************//
XLS->Sheet[0]->FillRandom("A1:I10",300); //Add somw random numbers
XLS->Sheet[0]->ConditionalFormats->Add();
XLS->Sheet[0]->ConditionalFormats->Add()->Areas->Add(0,0,9,9);
XLS->Sheet[0]->ConditionalFormats->Add()->Condition1->Formula1="100";
XLS->Sheet[0]->ConditionalFormats->Add()->Condition1->Formula2="200";
XLS->Sheet[0]->ConditionalFormats->Add()->Condition1->CompOperator=coBetween;
XLS->Sheet[0]->ConditionalFormats->Add()->Condition1->FmtPattern->ForeColor=xcRed;
//**********************************************************************************************************************************//
In output XLS sheet it fills A1:I10 with random values from 0 to 300, but it does not do any frmating (does not color in red cells with values between 100 and 200)
What i'm doing wrong ??