I am unable to install "Microsoft.ACE.OLEDB.12.0" I have Office 365 which is downloaded.
Anyway I found the following code which read the rows into an array. then I thought I would load that into the grid.
The issue is the dates in the array are numbers such as 43810 = 12/11/2109 and 43782 = 11/13/2019. How can I convert the number into its date?
TIA
DougP
Anyway I found the following code which read the rows into an array. then I thought I would load that into the grid.
The issue is the dates in the array are numbers such as 43810 = 12/11/2109 and 43782 = 11/13/2019. How can I convert the number into its date?
TIA
Code:
'Load grid with excel data
Dim application = New Excel.Application()
Dim workbook As Excel.Workbook = application.Workbooks.Open(gblExcelFilename)
Dim worksheet As Excel.Worksheet = workbook.Sheets(1)
Dim usedRange = worksheet.UsedRange
Dim usedRangeAs2DArray As Object(,) = usedRange.val
'workbook.Save()
workbook.Close()
application.Quit()
DougP