|
-
Aug 4th, 2011, 10:31 AM
#1
Thread Starter
New Member
Array to Excel
Hello all. I just have a quick question. I have an array that looks like this:
Dim x() As Integer= {20, 35, 50, 15, 75, 30, 55, 62.5, 15, 40, 40, 62.5, 35, 45, 50, 32.5, 42.5, 20, 47.5, 27.5, 60, 35, 75, 30, 45, 37.5, 25, 37.5, 30, 45}
I would like for each value of the array to be in its own cell in Microsoft Excel, with the first value, 20, in cell E2, and the final value, 45, in cell E31. How would I go about doing this. I thought that I could do this:
xSheet.Columns("E2:E31") = {20, 35, 50, 15, 75, 30, 55, 62.5, 15, 40, 40, 62.5, 35, 45, 50, 32.5, 42.5, 20, 47.5, 27.5, 60, 35, 75, 30, 45, 37.5, 25, 37.5, 30, 45}
But I get an error message each time, so it is probably wrong.
I have been successful in filling the first 4 columns of the spreadsheet with other arrays, but this is the first array in it that is using values a define before the program begins.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|