Formatting not preserved when converting from �XML Spreadsheet 2003� format to XLSX format

Dear Aspose team,

I tried with Aspose 8.6.2, and I can confirm the results are much better, and many of the visual discrepencies between the original .xml files and the converted .xlsx files are now fixed.

However, there are still cases where we can see differences in styles. It looks like the fixes affect the font-size styling the most, but there are similar issues with other styling attributes that seem to still have issues. Also, a few font size issues still remain, so there seem to be edge cases that can still cause such differences.

For example, I could find differences on the following Excel styling attributes, by using a script checking many documents we have to convert :

.VerticalAlignment
.Width
.NumberFormatLocal
.NumberFormat
.Font.Size
.Borders.LineStyle
.Borders.Weight
.Borders.Value
.Font.Name
.Font.FontStyle
.Font.Color
I will try to produce a test file to reproduce the most common issues.

In the meantime, I observed a visual difference on the existing test file "extended_01" that I provided. In the second sheet, I see the text in lines 2 and 3 not-bold before conversion, but bold after conversion. I would guess it would be a problem with the styling attribute Font.FontStyle.

Can you confirm if you are able to see this difference as well with Aspose 8.6.2 ?

Best regards,

Aspose.Cells User.


Hi,


Thank you for your response.

I have checked the case related to bold text in resultant XLSX and I am able to notice this problem on my side. Moreover, I have noticed that the fonts used for row 2 &3 is MS PGothic in source XML (when loaded in Excel) whereas the resultant XLSX has Arial for the same. Could you please confirm if you are seeing the same behavior or is that due to the reason that I do not have MS PGothic font installed on my machine?

Hi,

thank you for double checking and raising this, I did not notice myself.

I confirm, in addition to the bold style that was obvious, I can also see that the font name changes from PGothic in the xml format to Arial after conversion, and also the font size changes from 20 in the xml format to 18 after conversion (I opened both files in Excel 2010).

Best regards,

Aspose.Cells User.

Hi,

FYI I ran the diff script we have on three test case files I had, and it found only the differences that we have noted, applying to 14 cells, all in the second sheet (difference in that sheet is that it has a “sheet level” styling applied, while the first one does not) :

14 .Font.Bold,False,True
14 .Font.FontStyle,標準,Bold
14 .Font.Name,MS Pゴシック,Arial
14 .Font.Size,20.0,18.0

I do have other cases of differences as we have many files to convert, but I cannot share those, so I will try to provide more custom test case files if I can. My hope is that my “extended_01” test file covers many cases, and that most issues would be solved already if that one can be perfectly converted.

Best regards,

Aspose.Cells User.

Hi,


Thank you for the confirmation on font change as discussed in my previous post. Regarding your analysis, it a bit confusing so let me put up my findings here for your confirmation. I have compared first 8 cells of column A for style change between source XML and resultant XLSX. As per my observation, the cells A1 to A4, A6 & A8 in source XML have the MS Pゴシック font in size 20 with no font styles set, whereas same cells in resultant XLSX have Arial font in size 18 with bold style. Cell A5 in source XML has Arial font in size 14 with no style set, this remain intact in resultant XLSX as well. Cells A7 & A9 have MS P明朝 font in size 10 & 8 respectively, same remains intact in resultant XLSX. Please check and confirm the attached spreadsheet for comparison results so I may move forward to report them.

Regarding other issue, we suggest you to share individual sample for each distinct problem. Moreover, it would be appropriate to create one thread per problem for easy management of your requests.

Hi again,


Please check the spreadsheet shared in my previous response, and confirm the problems so I can reopen the ticket for further analysis. Thank you.

Hi,

sorry I have been unavailable for a few days.

Thank you for investigating further. I confirm that my tool detected all the differences you highlighted in your xlsx document posted previously. My tool also found similar differences in some more cells though. I found differences in font, boldness, and font size in the following cells :
- A1 -> A4 , A6, A8 (same what you listed)
- B1 -> B8 (those were not listed in your document)

Visually, I can also see that all cells below A8 and B8 also have the same differences, so it looks like the difference in styles applies to the whole two columns.

I don’t think you needed to wait for my confirmation to let the work start on this though, as you do have documents that expose the bug already - the fact that I can reproduce the same does not really add more information at that point (especially as I provided those in the first place, so yes, I do have the same issues). As soon as you have a use case where Aspose.Cells generates something that is not as expected after conversion, I think it should be ok to immediatetly reopen the ticket for further analysis.

Best regards,

Aspose.Cells User.



Hi,


First of all, let me explain why I waited for your confirmation. This was to make sure that you are seeing the same results what I am having on my side. Please note, when considering styling, the results may differ due to a number of reasons, such as locale of the machine (mostly number and date formats get effected), version of Excel application (Excel 2007 behaves differently for some cases) and so on. Anyway, I have reopened the ticket CELLSJAVA-41541 providing our investigation results for product team’s review. We will keep you posted with updates in this regard.


Dear Aspose support,

thank you very much for working on this issue.

I had time allocated to do more tests today, and I created additional sample files that show other formatting differences after converting to xlsx with Aspose.Cells 8.6.2. Hopefully those samples can be useful test cases to help fixing the discrepancies in formatting. The other issues are probably related to this issue, so maybe fixing one could fix some other issues at the same time, or at least they may help to find a similar fix.

I opened :

Vertical alignment and column widths not always preserved when converting from �XML Spreadsheet 2003� format to XLSX format - Free Support Forum - aspose.com

Font color not always preserved when converting from �XML Spreadsheet 2003� format to XLSX format - Free Support Forum - aspose.com

Thanks and regards,

Aspose.Cells User.

Hi,

Thanks for your feedback and using Aspose.Cells.

We have now replied your two newer issues in your other two threads. Please check the threads and update us there. Thank you.