Completed Excel problem- cells lose format

Hi.

We have an Excel with eight workbooks, the two firts are hidden and we use aspose.cells to complete data in the hidden workbooks. The rest workbooks only present the data obtained from the hidden workbooks, than from Excel works properly, but we have used aspose to complete the hidden workbooks data the rest workbooks cells lose the format.

See the atached files.

Can you help us?.

Thank you for all.

This is the used code:

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);

Hi,

Thanks for providing us the sample files.

We have found the issue. I think your file is created in MS Excel 2007. The background of cells is gradient fill. It’s the feature of MS Excel 2007. We support this compatible feature for XLS format in our future versions.

I have logged it into our issue tracking system with an id: CELLSNET-18284.

Thank you.

Hi.

We need to know when you will fix the issues, because we have and end date to finish my project and we will need notify to my client this problem.

Thank you.

Hi,

Hopefully, we can provide a fix before the end of this week.

Thank you.

Hi,

Please try the attached version.

We have supported the feature.

Thank you.

Hi again.

We haven't been able to test the new versíon, because the attached version gives us an exception when we do this code: workbook.Save(GeneratedFile);

In the oldest version this code worked properly.

Please, are we doing something wrong?

Thank you for all.

Hi,

Sorry for your inconvenience.

Yes, we noticed the issue i.e. “‘System.IO.DirectoryNotFoundException’…Could not find a part of the path ‘…’.”. We will soon provide you the fixed version.

Thank you.


Hi,

Please try the attached version, we have resolved your issue now.

Thank you.

Hi again.

It works properly.

Thanks for all.