Apache OpenOffice (AOO) Bugzilla – Issue 66842
Saving User-defined Format codes in ods and sdc formats.
Last modified: 2017-05-20 11:13:20 UTC
User-defined Format codes aren't saved in ods or sdc formats. They are saved with xls format. As an example, H:MMa/p displays time as 1:11a or 1:11p as long as the spreadsheet is open. However, if the spreadsheet is saved, closed, and reopened the format is lost and the format reverts to HH:MM AM/PM. Saving, closing, and reopening the file in xls format retains the H:MMa/p format. The requested enhancement would save User-defined Format codes in ods and sdc formats.
Hi Eike, as discussed one for you. Frank
I'm not quite certain how this works, but I'd be thrilled to contribute to testing of this enhancement.
Accepting issue, though it's a rarely used time format. It isn't even internationalized/localized, contrary to the AM/PM format. Lowering priority to P4. Storing that in ODF would also need a file format change to add a new number:time-style element, such as number:a-p
Hi Guys, As I understand the issue it's not about another number format. The enhancement is to type in an arbitrary format code and have Calc "remember" the code and still treat the data as a number. In that case even something like HH:MM "in the morning"/"in the evening" would work. (I've no idea if this is even practical)
dmcp you're correct in your understanding of the issue. I simply want the format code to be saved. Your "in the morning"/"in the evening" example demonstrates the concept but doesn't work. HH:MMa/p works flawlessly but won't save. I have to reformat cells each time I open the spreadsheet. It does save in xls format.
Here's another example that surprised me more. Consider Cell A1: Value: 1, Alignment: left-justified, cell format " " # Cell A2: value: 1, Alignment: right-justified, cell format # " " In both cases it is desired to space the number away from the cell edge. Save and re-open in both .xls and .ods formats Results: both formats are returned in .xls format; only the A2 format is returned in .ods format. Because these two formats are completely symmetrical, would this be considered a bug?
@drhatch: losing a leading space would be a separate issue. Note that for spacing you may as well use Format.Cells.Borders "Spacing to contents".
Reset assigne to the default "issues@openoffice.apache.org".