Sheet.Range("A1", "BC2000").Value = xmatrix
Dim oXL As Excel.Application
oXL = CreateObject("Excel.Application")
oXL.Visible = True
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
' Get a new workbook.
oWB = oXL.Workbooks.Add
oSheet = oWB.ActiveSheet
oSheet.Name = "mytest"
Dim Rng As Excel.Range
Rng = oSheet.Range("A1", Reflection.Missing.Value)
Rng = Rng.Resize(xarray.GetLength(0), xarray.GetLength(1))
Rng.Value = xarray
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
You've used it with the dimensions of the array to get the correct range.