I pull data from an Oracle table and loop through to fill an array.
I then transfer the array into an excel sheet.
2 columns are supposed to be numbers, but are "saved" on the excel sheet as text. Clicking on the little green corner states "Saved as Text".
conditioning the data prior to entering it into the array:
Then setting the column format:Code:CDbl(rstNumQCRs("PERCENTAGE").Value)
Entering the data in the sheet:Code:.Columns.range("H2:H100").NumberFormat = "0.00"
Code:.Range(.Cells(2, 1), .Cells(r + 1, 8)).Value = arData
Setting the format before or after does not alter the data, it is still saved as text.
The top row contains the col titles, could this be the cause?


Reply With Quote
