jopevazquez
Member
Hello all,
I'm using erel function to get data from an excel file, but I have a problem with dates.
I need them as a DD/MM/YYYY but it is returning MM/DD/YY
I'm sending all cells to this function, then I don't know the colums that are a date.
Is there any way to force locale?
This is Erel function
Thanks a lot for your help
I'm using erel function to get data from an excel file, but I have a problem with dates.
I need them as a DD/MM/YYYY but it is returning MM/DD/YY
I'm sending all cells to this function, then I don't know the colums that are a date.
Is there any way to force locale?
This is Erel function
Function:
Sub PoiGetFormattedCellValue(ExcelCell As PoiCell) As String
Dim JOCell As JavaObject = ExcelCell
Dim JODataFormatter As JavaObject
Dim JOConditionalFormattingEvaluator As JavaObject
Dim JOFormulaEvaluator As JavaObject =JOCell.RunMethodJO("getSheet",Null).RunMethodJO("getWorkbook",Null).RunMethodJO("getCreationHelper",Null).RunMethodJO("createFormulaEvaluator",Null)
JOConditionalFormattingEvaluator.InitializeNewInstance("org.apache.poi.ss.formula.ConditionalFormattingEvaluator",Array As Object (JOCell.RunMethodJO("getSheet",Null).RunMethodJO("getWorkbook",Null),JOCell.RunMethodJO("getSheet",Null).RunMethodJO("getWorkbook",Null).RunMethodJO("getCreationHelper",Null).RunMethodJO("createFormulaEvaluator",Null)))
Return JODataFormatter.InitializeNewInstance("org.apache.poi.ss.usermodel.DataFormatter",Null).RunMethod("formatCellValue",Array As Object (JOCell,JOFormulaEvaluator,JOConditionalFormattingEvaluator))
End Sub
Thanks a lot for your help