-
Notifications
You must be signed in to change notification settings - Fork 908
Description
Do you want to request a feature or report a bug?
- Bug
- Feature
- Question
Did you test against the latest CI build?
- Yes
- No
If you answered No, please test with the latest development build first.
Version of ClosedXML
0.102.3
What is the current behavior?
I'm struggling with writing clean and flawless code using the ClosedXML library. I usually have very simple scenarios, like these:
- I have a header cell or regular cell, that contains uncalculated constant string. And I want to get it as a string.
- I have a cell with a numeric, uncalculated constant value. And I want to get it as a string (for various reasons).
- I have a cell with some value, that may be or may not be calculated (i.e. contains a formula). I want to get the displayed value as a string.
In general, I can somehow get a value. But I don't know if this is the best approach. The documentation hasn't helped much.
What is the expected behavior or new feature?
The methods have clearly and thoroughly defined uses.
Is this a regression from the previous version?
Dunno.
Reproducibility
Code to reproduce problem:
string value;
value = worksheet.Row(row).Cell(1).GetValue<string>();
value = worksheet.Row(row).Cell(1).GetString();
value = worksheet.Row(row).Cell(1).GetText();
value = worksheet.Row(row).Cell(1).Value.ToString();
value = worksheet.Row(row).Cell(1).Value.GetText();
value = worksheet.Row(row).Cell(1).CachedValue.ToString();
value = worksheet.Row(row).Cell(1).CachedValue.GetText();Can you please explain the differences thoroughly and possibly improve the documentation with such information? 🙏