To apply a specific formatting to an excel cell i use e.g
Code: Select all
self.CmdFormat.BeginEdit(psheet);
self.CmdFormat.Number.Format := pNumberFormat;
self.CmdFormat.Apply(pColumn, pRow);
The limit seems to be 200 or maybe 255, i'm not sure.
Is there a way to count the used number of formats in an excel file?
If I extract an xlsx file and take alook in xl/style.xml is see something like:
<numFmts count="120" >
<numFmt numFmtId="50" formatCode="0.0" Mosa.doc"" />
<numFmt numFmtId="51" formatCode="0.0" Dravima.doc"" />
<numFmt numFmtId="52" formatCode="0.0" Jongstra.doc"" />
<numFmt numFmtId="53" formatCode="0.0" .xls"" />
<numFmt numFmtId="54" formatCode="0.0" Pallets.xls"" />
<numFmt numFmtId="55" formatCode="0.0" ziekteverzuimbegeleidingsformulier.doc"" />
<numFmt numFmtId="56" formatCode="0.0" overwerkdeclaratie.doc"" />
....
Is there a property in xlsReadWrite to query these value so that I am able to prevent creating a corrupt excel file by querying these value and stop adding new numberformats in case that a specific limit is reached?.
I also wonder why the first numFmtId starts with '50'and not '0'.
Thank you.