-
-
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
Add GetRows to retrieve unformatted cell values #621
Conversation
Codecov Report
@@ Coverage Diff @@
## v2 #621 +/- ##
==========================================
- Coverage 96.67% 96.59% -0.09%
==========================================
Files 30 30
Lines 8932 8948 +16
==========================================
+ Hits 8635 8643 +8
- Misses 183 191 +8
Partials 114 114
Continue to review full report at Codecov.
|
Shall I update this? Is there any possibility that this may be merged or at least reviewed? |
Hi @xuri, shall I update this? |
Hi @tgulacsi, thanks for your PR. I need some time to review. |
To be able to convert the to time.Time with ExcelDateToTime, without de-formatting them
To be able to convert the to time.Time with ExcelDateToTime, without de-formatting them
Codecov Report
@@ Coverage Diff @@
## v2 #621 +/- ##
==========================================
- Coverage 96.73% 96.67% -0.06%
==========================================
Files 31 31
Lines 8626 8635 +9
==========================================
+ Hits 8344 8348 +4
- Misses 160 165 +5
Partials 122 122
Continue to review full report at Codecov.
|
Hi @tgulacsi thanks for your PR, and sorry for my so late reply. I suggest adding an option for columns and rows iterator, to support specified if apply number format, instead of adding the new function |
Ok, I can add a "rawValues bool" to Cols, Rows, rowsXMLIterator & co. structs, but how to allow setting these parameters? |
Hi @tgulacsi, I've added optional parameters for the rows, err := f.GetRows("Sheet1", excelize.Options{RawCellValue: true}) |
Thanks, that's perfect! |
- Support text comparison in the formula, also ref qax-os#65 - `GetCellValue`, `GetRows`, `GetCols`, `Rows` and `Cols` support to specify read cell with raw value, ref qax-os#621 - Add missing properties for the cell formula - Update the unit test for the `CalcCellValue`
This allows converting to time.Time without goint throguh the formatting and parsing steps.
Use the stored floating point number insted.
The only remaining step is a helper that decides whether the cell is a date or not (sth. like
File.Styles.CellXfs.Xf[cell.S].NumFmtID IN (14, 15, 16, 17, 22)
).Checklist