We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Time of creation/modification of xlsx document are localized

Dates of creation and modification of document are localized:
What I mean here is data, stored in:
docProps/core.xml

What I mean here is that when I run some code one 1 machine and save file I get one time:

- <cp:coreProperties >
<dc:creator>User</dc:creator>
<cp:lastModifiedBy>User</cp:lastModifiedBy>
<dcterms:created xsi:type="dcterms:W3CDTF">2012-11-09T14:04:03Z</dcterms:created>
<dcterms:modified xsi:type="dcterms:W3CDTF">2012-11-09T14:52:12Z</dcterms:modified>
</cp:coreProperties>
And when I run it on the machine, which is in different time zone, I get appropriately localized time:
<cp:coreProperties >
<dc:creator>User</dc:creator>
<cp:lastModifiedBy>User</cp:lastModifiedBy>
<dcterms:created xsi:type="dcterms:W3CDTF">2012-11-09T09:04:03Z</dcterms:created>
<dcterms:modified xsi:type="dcterms:W3CDTF">2012-11-09T09:52:12Z</dcterms:modified>
</cp:coreProperties>

That means that code with data, which is run on one machine might have different output on other machine, if there is different time zone. I am not sure if that was a design idea, but that is not quite solid solution.
Why? For example we have some integration tests for library usage, which might be run by any team member or merely by automation tools on different machines( read as different time zones). Since output will be different for each machine - tests are not stable.
So I guess I would like you to consider simple feature request - save these datetimes with reference to timezone, but not as localized items.

Hi,


Thanks for sharing some details.

Well, we need to evaluate your feature request at first. We will look into it soon. I have logged a ticket with an id “CELLSJAVA-40520” for your case/scenario. Our concerned developer may look into and analyze it. If we need some more details from your end, we will request you here.

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

Thank you.

Ok. Thank you.
For now I will just set up constant timezone for my tests.

I have to bring this up further.
After I have preset up timezone, mentioned difference has gone away. But now I see another difference between output files, received on different computers. It appears in sheetN.xml.
sheetFormatPr.defaultColWidth and col.width differs in output files on different computers.

<sheetFormatPr defaultColWidth="9.142857142857142" defaultRowHeight="15" />
- <cols>
<col min="2" max="2" width="32.285714285714285" customWidth="1" />
<col min="3" max="3" width="19.428571428571427" customWidth="1" />
</cols>

So my question would be: why do we have this difference? Is there any other dependency on environment, except for timezone?
I would appreciate elaborated answer: not the usual I can reproduce and created ticket or I can't and that's all. I need some feedback to resolve this, I can't wait for 3 month until you possibly resolve the issue. Maybe you could explain where for example defaultColWidth come from, since I don't see it in the original sheet1.xml or why do we have slight changes in width values?
Find attached:
1)original.xlsx file; which was used
2)sheet1.xmls from original file, output file on first computer and output file of second PC
3)difference.png screenshot, which points out the difference between these files.

I am really frustrated. I did not experience any similar problems with your Aspose.Words library, as I faced now with Aspose.Cells.

Hi,


Thanks for providing the details and sample / source files.

Well, I have discussed the matter with the developers a bit. Please spare us some time to investigate your issue on our end. A ticket is logged for the issue separately with an id “CELLSJAVA-40526”, we will look into it soon. We will keep you posted here once the things move along. Hopefully, we would provide you complete details on your issue.

By the way, could you provide more details about your mentioned two PCs where you got the output files having differences regarding defaultColWidth values etc. in the source .xml files. Give us their OS with regional/language settings etc. Also provide the source sample code that you used with your template input file to generate the output files, also attach the output Excel files here for both PCs / systems. All these help us to investigate your issue more precisely.

Thank you.

I think that we have manged to localize why do we have differences on different PCs.
It might sound strange, but the reason for that seems to be installation of Microsoft Office.
Turned out that when Office is installed on machine - we receive one output document. When Office is absent - another sample of output document.

We tested this on following PCs:
These pair gives us one output:
1)win7 + Office; English/United States
2)win7 + Office

And following give other output:
1)win7 without Office; English/United States
2)redhat-releaseCentOS release 5.9 (Final)
3)redhat-releaseCentOS release 5.9 (Final)
4)redhat-releaseCentOS release 5.9 (Final)
5)redhat-releaseCentOS release 5.9 (Final)

Regarding sample code - unfortunately I can’t do that. It is build in into architecture and I can’t just cut out relevant pieces, without context that would not mean mach to you.
Code replaces visible text elements in file for other text elements. But doesn’t do any other changes to formatting.

Hi,

We have fixed the issue of Timezone in the new fix/version(Aspose.Cells for Java v7.4.3.5.). Please try it.

For the issue of different width values, we think the possible reason is the different locale or font settings. It is hard for us to figure the issue out without the environments to reproduce the issue. We think you can try the following ways to see whether you can get different results:

1) Set the locale to the same one for your application when you run it on different PCs. You can use the same JVM option(s) to set the locale or set region of WorkbookSettings for the specific Workbook object.

2) Please check whether the font dir contains the same fonts for your different pcs. You can try to make a new dir and copy only the Calibri font into it and then set this new dir as your font dir for your application:

CellsHelper.setFontDir(...);

Try this way for your different pcs to check whether you can get the same result for the XLSX file.

Thank you.