-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Getting "p12" when reading a time formatted as 11:32:34 AM #1080
Comments
Ah, I found it. Here is a delve session which illustrates the bug:
So in parseTime() we have a replacements table:
So when we are building up a go time format string like: "03:04:05 pm", then two iterations later, we blow over top of the "m" in "pm" and replace it with a 1. |
Oh rats, this is a duplicate of #1060. Hopefully this will help the next person find this. Could you please make a release with this fix? This bug is pretty bad! |
Thanks for your issue, this patch will be release in the next version v2.5.0. |
Description
I am new to working in detail with Excel files; please forgive my ignorance, and thanks in advance for your help. I am receiving XLSX files from a customer, and I have no control over their contents. Among many other columns, in the input files we have a column of timestamps, like this:
However when I process the file with excelize, this column comes out from GetRows() like this:
Steps to reproduce the issue:
This spreadsheet contains a cut-down test case with only a few interesting cells; I made it using copy/paste from the original customer data in order to try to preserve everything.
Describe the results you received:
When run, the program prints the following, mangling the "pm" designator to "p12":
Describe the results you expected:
When I load this file into python:
Which seems right.
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Linux x86
The text was updated successfully, but these errors were encountered: