ST
stanleyj
Syncfusion Team
July 24, 2006 11:24 AM UTC
Hi Marcus,
The case-sensitive issue is corrected in v4.2.. For the cell to be exported as formula, a validation is required. As we cannot pass spaces in formulae when converting to excel, this workaround of avoiding the spaces can be adopted before converting the grid''s content..
private void RemoveSpaces()
{
for(int i=1; i<= this.gridControl1.RowCount; i++)
for(int j=1; j<= this.gridControl1.ColCount; j++)
{
if(this.gridControl1[i,j].CellType == "FormulaCell" && this.gridControl1[i,j].Text.StartsWith("="))
{
string newText = this.gridControl1[i,j].Text;
for(int k=0; k<= newText.Length; k++)
{
int c = newText.IndexOf(" ",k,newText.Length-k);
if(c > 0)
newText = newText.Remove(c,1);
}
this.gridControl1[i,j].Text = newText;
}
}
}
Regards,
Stanley