Hi,
I have an Excel range which contains just numbers and I need to put in a 2 dimensional array of singles.
I've got the Excel range into an array of Objects:
Dim arrSheet_Obj(,) As Object
arrSheet_Obj = wksData_File.Range(wksData_File.Cells(2, 2), wksData_File.Cells(lNumWaves, lNumTimes)).Value
You can't dump the Excel range straight into an array of single as it can't convert the type.
I've tried to use array.ConvertAll, but can't work out the syntax
I've tried this as well:
but it can't convert 2D array to single - obvious I suppose.
I'm just going to do a double loop for now, but would be nice to do it right.
Thanks
Kristian
I have an Excel range which contains just numbers and I need to put in a 2 dimensional array of singles.
I've got the Excel range into an array of Objects:
Dim arrSheet_Obj(,) As Object
arrSheet_Obj = wksData_File.Range(wksData_File.Cells(2, 2), wksData_File.Cells(lNumWaves, lNumTimes)).Value
You can't dump the Excel range straight into an array of single as it can't convert the type.
I've tried to use array.ConvertAll, but can't work out the syntax
I've tried this as well:
Code:
arrSheet_Sing = CType(arrSheet_Obj, Single)
I'm just going to do a double loop for now, but would be nice to do it right.
Thanks
Kristian