I have created an array in VB and want to copy the whole array to an excel spreadsheet rather than doing it a line at a time. This will make the process much quicker.
The array code at VB end is like as follows
xlWorkSheet.Range("A2").Resize(x, y).Value = MyArray
The excel spreadsheet has headings
Name, Dept, Salary
Rather than being displayed as
Name Dept Salary
Smith Accounts 10000
Green Sales 14500
Brown Accounts 12000
It is getting displayed as
Name Dept Salary
Smith Green Brown
Accounts Sales Accounts
10000 14500 12000