Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding custom number format to a template could fail with existing non-sequential ids #1940

Merged
merged 3 commits into from
Dec 22, 2022

Conversation

jahav
Copy link
Member

@jahav jahav commented Dec 20, 2022

Adding custom formats to a template that already contained the custom number formats could fail, if the number format ids in the template weren't sequential.

E.g. in this sequence, the 169 is missing.

<numFmts count="7">
	<numFmt numFmtId="165"
			formatCode="[$-409]dd\-mmm\-yyyy;@"/>
	<numFmt numFmtId="166"
			formatCode="[$-409]hh:mm:ss;@"/>
	<numFmt numFmtId="167"
			formatCode="[$-409]hh:mm;@"/>
	<numFmt numFmtId="168"
			formatCode="[$-409]hh;@"/>
	<numFmt numFmtId="170"
			formatCode="#,##0.00;\-#,##0.00;0;@"/>
	<numFmt numFmtId="171"
			formatCode="[$-409]dd\-mmm\-yyyy\ hh:mm:ss;@"/>
	<numFmt numFmtId="172"
			formatCode="#,##0;\-#,##0;0;@"/>
</numFmts>

Resolves #1679

… number formats could fail, if the number format ids in the template weren't sequential.
… was a built-in style reference with a number from 0..163 (without format code, because it is built-in number format)
@jahav jahav force-pushed the 1679-numberformat branch 5 times, most recently from f55cc85 to 46d1e8d Compare December 22, 2022 00:41
@jahav jahav added this to the v0.100 milestone Dec 22, 2022
@jahav jahav merged commit a0b0bb2 into develop Dec 22, 2022
@jahav jahav deleted the 1679-numberformat branch December 22, 2022 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style.NumberFormat.Format - throws {"An item with the same key has already been added. Key: 171"}
1 participant