Writing an array to a CSV file
<p>I a trying to create an array and output it to an excel with the correct rows and columns. But when I run the code below, it gives me them in all in one column and 16 rows. Any way i can change it so that it gives it to me in 4 columns and 4 rows?</p>

<pre><code>do i = 1, 4
  do j = 1, 4

    test(i,j) = 2

    print *, test(i,j)
    open( unit = 10, file = "test.csv")
    write(10,*), test(i,j)
  end do
end do
</code></pre>