Creating a property to get the text plain of a cell ignoring given format in the excel sheet#72
Creating a property to get the text plain of a cell ignoring given format in the excel sheet#72davidaso28 wants to merge 1 commit intomganss:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #72 +/- ##
==========================================
- Coverage 90.34% 89.77% -0.57%
==========================================
Files 6 6
Lines 632 636 +4
Branches 77 78 +1
==========================================
Hits 571 571
- Misses 50 53 +3
- Partials 11 12 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
What's the use case for this? Numeric cells that are mapped to string properties should automatically get the formatted value now. |
|
I have some cells that are formatted as date with content 10-11 when I call the fetch method I receive 10/11/2020 if I change the Data Formatter for a custom DataFormatter I would affect whole the date's interpretation. I want to determine with this flag when I want to get the text value and when I want to apply the data format. Also, when you have a custom format in excel sheet you can avoid any data transformation by demand. Please let me know if there is another way to achieve this. Thanks for your quick reply. |
|
Sorry, I don't get it. The cells that are date formatted as "10-11" should be mapped to a string property using the format specified in the Excel sheet so you'll get the string "10-11" in your string property. What exactly do you mean with the text value? Date cells are numeric cells and as such are stored as numbers in the Excel sheet. If you don't want/need the formatted string you can always map to a Can you post an example Excel sheet along with the class you're mapping to? |
Hello,
First of all, I would like to say congratulations on your fantastic job with this library; it is handy and easy to understand.
I have made just a small change creating a property to determine if the library has to map the value ignoring the cell type or format established and just return plain text.