-
-
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
extend cell value load to support custom datetime format #703
Conversation
Codecov Report
@@ Coverage Diff @@
## master #703 +/- ##
==========================================
+ Coverage 95.52% 95.59% +0.06%
==========================================
Files 31 31
Lines 8379 8442 +63
==========================================
+ Hits 8004 8070 +66
+ Misses 226 225 -1
+ Partials 149 147 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR, I have left some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, I suggest removing personal info from the doc properties of the test spreadsheet files, and could you add some unit tests for the non covered codes?
Got it, will do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested by the spreadsheet attachment 1_2017-06-29.xlsx
in the issue #73 uploaded by vchugreev
, It seems like the value 29\ June\ 2017\ \г\.;@
after applying number format code contains escape characters.
Fixed in https://github.com/artiz/excelize/commit/6e66d1dab42abf6bfce59685825e1ccd46bba2ad |
Thank you for the amazing work you are doing, The library is pretty great when reading XLSX files, however I am facing the same problem when parsing dates. Some times the date value is parsed as string e.g: 25/03/2016, some times it's parsed as a float like 43345.5 and some times as an integer. I believe this PR would probably solve it? if so do you have any estimate when this will be merged? Thanks! |
@artiz Thanks for your PR. @omaralsoudanii I have merged this PR. |
* extend cell value load to support custom datetime format * cleanup incorrect imports * fix numeric values conversion as done in legacy Excel * fix tests coverage * revert temporary package name fix * remove personal info from test XLSX files * remove unused dependencies * update format conversion in parseTime * new UT to increase code coverage * Resolve code review issue for PR qax-os#703 * Rename broken file name generated by unit test Co-authored-by: xuri <xuri.me@gmail.com>
* extend cell value load to support custom datetime format * cleanup incorrect imports * fix numeric values conversion as done in legacy Excel * fix tests coverage * revert temporary package name fix * remove personal info from test XLSX files * remove unused dependencies * update format conversion in parseTime * new UT to increase code coverage * Resolve code review issue for PR qax-os#703 * Rename broken file name generated by unit test Co-authored-by: xuri <xuri.me@gmail.com>
PR Details
Add support for custom number formats to support all date-time variants parsing
Description
We are using excelize in our ETL project tp parse variety XLSX files from our customers and had found that lots of required dates are parsed incorrecty as raw numbers. So we decided to extend dates support to use custom formats
Related Issue
PR provides fix for #73
Motivation and Context
PR provides support of custom Excel datetime formats
How Has This Been Tested
New Unit Test added
Types of changes
Checklist