Hi, again.
Sorry, but we have the same problem after the hotfix.
The cells lose the conditional rules after we use Aspose.Cells to complete the worksheet.
This is the code:
LicenciarCells();
Workbook workbook = new Workbook();
workbook.Open(BalanceTemplatePath);
if (balanceData != null)
{
Cells cells = workbook.Worksheets[0].Cells;
foreach (KeyValuePair<string, string> bal in BalanceMapper)
{
object prop = balanceData.GetType().GetProperty(bal.Value);
object value = string.Empty;
if (prop == null)
value = string.Format("El campo {0} de la entidad no ha sido encontrado en la entidad", bal.Value);
else
value = balanceData.GetType().GetProperty(bal.Value).GetValue(balanceData, null) ?? string.Empty;
cells[bal.Key].PutValue(value);
}
}
if (pygData != null)
{
Cells cells = workbook.Worksheets[1].Cells;
foreach (KeyValuePair<string, string> pyg in PyGMapper)
{
object prop = pygData.GetType().GetProperty(pyg.Value);
object value = string.Empty;
if (prop == null)
value = string.Format("El campo {0} de la entidad no ha sido encontrado en la entidad", pyg.Value);
else
value = pygData.GetType().GetProperty(pyg.Value).GetValue(pygData, null) ?? string.Empty;
cells[pyg.Key].PutValue(value);
}
}
_generatedFile = string.Format("~/Temp/Balance-PyG_{0}.xls", DateTime.Now.Ticks);
workbook.Save(GeneratedFile);
Thanks for all.
Regards.