Result.png (4.6 KB)
Template.png (4.4 KB)
Hi aspose Team,
we are copying cell text from above cell to newly inserted cells , but font color is not coping into newly inserted cells.Text is coming in black color. I am using below code.
CurrentWorksheet.Cells.InsertRows(idesRow - Constants.ONE, DataTableRows - rowStart);
Row row = CurrentWorksheet.Cells.Rows[startRowsIndex];
for (int irow = idesRow - Constants.ONE; irow <= startRowsIndex + DataTableRows - Constants.ONE; irow++)
{
foreach (var iResultSet in reportColumns)
{
string dataValue = row[iResultSet.ColumnNumber].Value == null ? string.Empty : row[iResultSet.ColumnNumber].Value.ToString();
CurrentWorksheet.Cells[irow, iResultSet.ColumnNumber].PutValue(dataValue);
if (row[iResultSet.ColumnNumber].Value != null)
{
Style s = cells.GetCellStyle(startRowsIndex, iResultSet.ColumnNumber);
StyleFlag styleFlag = new StyleFlag();
styleFlag.All = true;
styleFlag.FontColor = true;
CurrentWorksheet.Cells[irow, iResultSet.ColumnNumber].SetStyle(s, styleFlag);
}
}
}
This is an urgent requirement for us, plz response ASAP.