Font color not always preserved when converting from �XML Spreadsheet 2003� format to XLSX format

Dear Aspose support,

I have found some cases where when
converting from “XML Spreadsheet 2003” format to XLSX format using
Aspose, the formatting is different after and before conversion (when I
open the files in excel 2010).

This is related to the issue described in the thread at url :

http://www.aspose.com/community/forums/2/664903/formatting-not-preserved-when-converting-from-xml-spreadsheet-2003-format-to-xlsx-format/showthread.aspx

The previous issue has been focused on issues related to font sizes,
and I have been advised to open new requests about other styling issues.

In this new sample xml file, after conversion with Aspose for Java
8.6.2, the font color is different. This is not a huge difference, but it is a different shade of blue. I attached a screenshot of what I see as well of the colors that Excel 2010 reports for one of the cells before and after conversion.

Would you be able to
reproduce those differences by opening my sample in excel, check how it
looks, then convert it to xlsx using Aspose.Cells for Java, and check
whether the formatting is different for you as well ?

Note : I converted the file with code like :

InputStream is = <get input stream of file in “XML Spreadsheet 2003” format>;
Workbook wb = new Workbook(is);
wb.save(outputFile, SaveFormat.XLSX);

Hi,


Thanks for providing us template file, sample code and screen shot.

After an initial test, I observed the issue as you mentioned by using your template file and sample code. I found that font color is not preserved when converting from your template “XML Spreadsheet 2003” file to XLSX format as per your attached screen shot.
e.g
Sample code:

Workbook wb = new Workbook(“Aspose_sample_213_utf8.xml”);
wb.save(“out1.xlsx”, SaveFormat.XLSX);

I have logged a ticket with an id “CELLSJAVA-41635” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.


Thank you very much for your quick reply and for reproducing the issue. I am looking forward to test again with an updated Aspose.Cells for Java version when available.

Thanks and regards,

Aspose.Cells User.

Hi,

Thanks for your posting and using Aspose.Cells.

Please spare us a week or two. Hopefully, your issue will be fixed in this time frame. Once the fix is available for you, we will let you know asap by posting in this thread. Have a good day.

Hi,


Please check the font setting in the file. Aspose.Cells returns “#1F497D” as the setting in the file, but it’s very strange that MS Excel returns “#333399”. Did you create this file with MS Excel?

Thank you.

Hi,

thank you very much for investigating this and for point this out, I did not notice, and indeed I found that my xml file is wrong in this case, and interestingly the conversion with Aspose.Cells actually fixes it. It seems to be an issue with Excel itself.

Those files are created with Excel 2010. What happens is we receive a model file, usually in .xls format. We save it as xml with the “save as” function by choosing the “XML Spreadsheet 2003” format in Excel. We have to do that because we rely on a system that uses those files in xml format. And in this case, I verified that just saving as xml format with Excel 2010 changed the colors.

Interestingly, the conversion with Aspose.Cells reverted the color to the correct one as seen in the original spec document in xls format. I tried to save back my xml file as .xls using Excel itself, and Excel did not revert to the correct color, it kept the modified, wrong one. As we can read the color in the xml file and see they are correct as you mentioned - this shows it seems to be a problem with how Excel itself interprets its own xml format.

Thank you so much for your help on this - this issue can be marked as invalid.

Best regards,

Aspose.Cells User.

Hi,


Thanks for your evaluation on your end.

As per your details, this is an issue with MS Excel and nothing to do with Aspose.Cells, so we won’t fix anything in our product.

Thank you.