I have issue calculating the formula using aspose, if data in the cell is empty and checking the condition in excel formula, that leads to error. I am using the below code to insert values in the workbook, if data empty it will insert the empty string. In the image attached, the table is generated through aspose and result is error, and table 2 was typed manually and it gives the result. And the formula is =SUMPRODUCT((K12:K15=“productB”)*1,(L12:L15<>"")*1,(M12:M15<>"")*1,(N12:N15<>"")*1,(O12:O15<>"")*1,O12:O15,M12:M15+N12:N15+L12:L15)
for (int rowIndex = 0; rowIndex < rows.Count; rowIndex++)
{
for (int columnIndex = 0; columnIndex < _columnHeaders.Count(); columnIndex++)
{
string cellValue = string.Empty;
if (rows[rowIndex].ContainsKey(_columnHeaders[columnIndex]))
{
cellValue = rows[rowIndex][_columnHeaders[columnIndex]];
}
worksheetData.Cells[rowIndex + 2, columnIndex].PutValue(cellValue);
}
}
image.png (3.8 KB)