[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exporting data
- Subject: Re: exporting data
- From: Brad Gom <b_gom(at)hotmail.com>
- Date: Wed, 21 Jun 2000 08:19:59 -1000
- Newsgroups: comp.lang.idl-pvwave
- Organization: University of Hawaii
- References: <email@example.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20011
If you specifically want to write a file for use in Excel, then its best to
write a text file where the values are seperated with commas (a CSV file). You
can use the PRINTF procedure to write formated text to a file, or WRITEU to
write binary data.
;Open LUN 1 for data.csv with write access.
OPENW, 1, 'data.csv'
;Do the output operation to the file.
PRINTF, 1, data,format='(9(f,","),f)'
;Close the file.
This will print out the contents of the data array, seperated with commas. Look
at the FORMAT keyword in the help to see how it works.
> Hi. I'm a fairly new user of IDL, and I was wondering if there is anyway to
> export IDL variables. For instance, if I've created an array in IDL and I'd
> like to graph it in Excel or some other graphing program is there any way to
> get the array to excel. Any suggestion would be greatly appreciated.