You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
while reading date cell value from an excel file (cell format is set to dd/mm/yyyy) through GetFormattedString() or GetValue() methods to read value it's format is changed to mm/dd/yyyy.
What is the expected behavior or new feature?
we expect the value should be same as displayed in excel file when using GetFormattedString() methods
Is this a regression from the previous version?
Not sure
Reproducibility
This is an important section. Read it carefully. Failure to do so will cause a 'RTFM' comment.
create an excel file just input date in dd/mm/yyyy format, set the cell format in excel file to dd/mm/yyyy.
add the date in 1st row and 1st column of the sheet.
verify that variable "formattedDateStr" is read in mm/dd/yyyy and it is not same as displayed in excel file.
UPDATE: seems like cell which is in system format mm/dd/yyyy, is failing to convert correctly. Attached screenshot
example: Input 03/01/2024 in excel file, but when its read using GetFormattedString() observe that it's read as 1/3/2024.
I attached a sample spreadsheet. (You can drag files on to this issue)
The text was updated successfully, but these errors were encountered:
vineethkasula
changed the title
Issue in reading Date values from excel file for dd/mm/yyyy format
Issue in reading Date values from excel file for dd/mm/yyyy using GetFormattedString() methods
Feb 5, 2024
Read and complete the full issue template
Do not randomly delete sections. They are here for a reason.
Do you want to request a feature or report a bug?
Did you test against the latest CI build?
If you answered
No
, please test with the latest development build first.Version of ClosedXML
e.g. 0.102.2
What is the current behavior?
while reading date cell value from an excel file (cell format is set to dd/mm/yyyy) through GetFormattedString() or GetValue() methods to read value it's format is changed to mm/dd/yyyy.
What is the expected behavior or new feature?
we expect the value should be same as displayed in excel file when using GetFormattedString() methods
Is this a regression from the previous version?
Not sure
Reproducibility
This is an important section. Read it carefully. Failure to do so will cause a 'RTFM' comment.
UPDATE: seems like cell which is in system format mm/dd/yyyy, is failing to convert correctly. Attached screenshot
example: Input 03/01/2024 in excel file, but when its read using GetFormattedString() observe that it's read as 1/3/2024.
Code to reproduce problem:
The text was updated successfully, but these errors were encountered: