Created attachment 28354 [details] Patch svn diff Attached patch fixes CellFormat (and related classes) so that the result of CellFormat.apply(cell).text is the same as Excel for the following cases: - negative numbers and formats with a single format section - formats with multiple sections (and conditions) - General/@ format for numbers - boolean TRUE and FALSE returned in uppercase (As an aside, my rationale for using CellFormat is that it does some things correctly that DataFormatter doesn't support e.g. scaling commas, quoted/escaped text in the format. I'm finding it easier to create patches for CellFormat than for DataFormatter, and I agree with the comment on my previous patch (issue 54328) that CellFormat and DataFormatter should be merged in the longer term.)
Applied in r1294072 I fully agree that CellFormat and DataFormatter should be merged in the longer term and current divergence is not good. I expect that someone will re-visit this code in the future. Regards, Yegor