You can write to an ascii file fairly easily using the printf procedure. For Excel documents, go to the code contribution library on this site, there are two excel reading utilities that may help. To write to Excel, I would write to a .csv file, which Excel can read.
To do a .csv (an ascii file with comma delimiters) you can do something like this:
pro make_csv
x = randomu(seed, 10,100, /double)
openw, lun, 'test.csv', /get_lun, width=10000
sizex = size(x, /dimensions)
stringx = strtrim(x,2)
stringx[0:sizex[0]-2, *] = stringx[0:sizex[0]-2, *] + ','
printf, lun, stringx
close, lun, /file
free_lun, lun
end
|