Dim joDF As JavaObject
joDF.InitializeNewInstance("org.apache.poi.ss.usermodel.DataFormatter",Null)
Dim s As String = joDF.RunMethod("formatCellValue",Array(cell))
This will help you with the bugdet, but some more steps will be required for the date as this method will return the number of days since 1900/01/01
Not sure I understand what you mean , java knows that 4.195E7 is 41,950,000, the format simply adds the decimal paces as it is a currency value as the OP requested.
Thanks everyone, besides the numeric numbers showing in scientific notation, saving them to SQL didnt ring any bells, they are saved as doubles. Good. The date issue however persisted until I found something on the net about the dates saved in excel as numbers. jPoi is returning the dates as numbers, which is accurate anyway.
All the numeric dates are actually the number of days since 1 Jan 1900, however, due to an apparent lotus notes 1-2-3 compatibilty that wanted to be maintained by MS, one needs to minus 2 to those days.
If your excel dates are returned as numbers with jPOI then convert them to date with...
B4X:
public Sub DateFromExcelDate(sValue As String) As String
Dim myperiod As Period
myperiod.Days = sValue - 2
Dim xlsDate As Long = DateUtils.SetDate(1900, 1, 1)
Dim newDate As Long = DateUtils.AddPeriod(xlsDate,myperiod)
DateTime.DateFormat = "yyyy-MM-dd"
Return DateTime.Date(newDate)
End Sub