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
Custom double format #,##0.000_);[Red]\(#,##0.000\)
will convert to datetime
#267
Comments
shps951023
changed the title
v0.16.1-0.17.1 auto datetime convert bug
v0.16.1-0.17.1 auto custom datetime format convert will cause double value to datetime type bug
Jun 29, 2021
shps951023
changed the title
v0.16.1-0.17.1 auto custom datetime format convert will cause double value to datetime type bug
v0.16.0-0.17.1 auto custom datetime format convert will cause double value to datetime type bug
Jun 29, 2021
styles.xml <numFmts count="2">
<numFmt numFmtId="43" formatCode="_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)"/>
<numFmt numFmtId="166" formatCode="#,##0.000_);[Red]\(#,##0.000\)"/>
</numFmts>
<cellStyleXfs count="3">
<xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>
<xf numFmtId="43" fontId="1" fillId="0" borderId="0" applyFont="0" applyFill="0" applyBorder="0" applyAlignment="0" applyProtection="0"/>
<xf numFmtId="0" fontId="2" fillId="0" borderId="0"/>
</cellStyleXfs>
<cellXfs count="5">
<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>
<xf numFmtId="0" fontId="0" fillId="2" borderId="1" xfId="0" applyFill="1" applyBorder="1" applyAlignment="1">
<alignment horizontal="center" vertical="center"/>
</xf>
<xf numFmtId="14" fontId="3" fillId="3" borderId="1" xfId="0" applyNumberFormat="1" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">
<alignment horizontal="center" vertical="center" wrapText="1"/>
</xf>
<xf numFmtId="166" fontId="4" fillId="2" borderId="1" xfId="0" applyNumberFormat="1" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">
<alignment horizontal="center" vertical="center"/>
</xf>
<xf numFmtId="166" fontId="4" fillId="2" borderId="1" xfId="1" applyNumberFormat="1" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">
<alignment horizontal="center" vertical="center"/>
</xf>
</cellXfs> sheet.xml <sheetData>
<row r="1" spans="1:4" ht="28.8">
<c r="A1" s="1">
<v>10618</v>
</c>
<c r="B1" s="2" t="s">
<v>0</v>
</c>
<c r="C1" s="3">
<v>43.199999999999996</v>
</c>
<c r="D1" s="4">
<v>1.2</v>
</c>
</row>
</sheetData> |
void Main()
{
var basicDate = new DateTime(2021, 01, 01);
var formatCode = @"#,##0.000_);[Red]\(#,##0.000\)";
var basicDateFormatString = basicDate.ToString(formatCode);
var formatCodeDate = DateTime.TryParseExact(basicDateFormatString, formatCode, CultureInfo.InvariantCulture,
DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, out var outDate);
Console.WriteLine(outDate);
} outDate |
It have to follow |
shps951023
changed the title
v0.16.0-0.17.1 auto custom datetime format convert will cause double value to datetime type bug
Auto custom datetime format Jun 30, 2021
#,##0.000_);[Red]\(#,##0.000\)
convert will cause double value to datetime type bug
shps951023
changed the title
Auto custom datetime format
Custom double format Jun 30, 2021
#,##0.000_);[Red]\(#,##0.000\)
convert will cause double value to datetime type bug#,##0.000_);[Red]\(#,##0.000\)
will convert to datetime
shps951023
added a commit
that referenced
this issue
Jun 30, 2021
Merged
v 0.17.3 fix this bug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version : v0.16.0-0.17.1
The text was updated successfully, but these errors were encountered: