comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: write data to an excell file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: write data to an excell file [message #42543 is a reply to message #42478] Fri, 11 February 2005 03:12 Go to previous message
Ralf Schaa is currently offline  Ralf Schaa
Messages: 37
Registered: June 2001
Member
Hi there,

to write excel sheets I use the good old spawn:

I spawn a perl script which reads all the stuff from a text file which
is previously created by idl.
When you need a lot of excel files it is quite nice to do it this way.

take a look at cpan.org:
Spreadsheet::WriteExcel

Cheers
-Ralf






Rick Towler wrote:
> Hello Matthias,
>
> It looks to me that you are simply creating ASCII files with an .xls
> extension. This really isn't an excel file. I have looked into the
> .xls format in the past (it was called "biff" at one point) hoping to
> create an IDL program that could write native .xls files but I never
> found a published format.
>
> You may find .slk (symbolic link) files are a good alternative. IDL has
> a built in function to create .slk files called WRITE_SYLK. In your
> case you would simply store all of your data in one array (assuming that
> it was of the same data type):
>
> data = [[kk],[xtt],[Tk]]
> ok = WRITE_SYLK('C:\test.slk', data)
>
> To add more columns you would add in more data.
>
> WRITE_SYLK will not allow you to write column headers which is an
> unfortunate limitation. I have modified WRITE_SYLK so you can pass it a
> structure which contains your data and the column headers which is nice
> since I always forget which column is which when I look at my data in
> excel! If you are interested I can make it available to you.
>
> Cheers!
>
> -Rick
>
>
> I can't post to the newsgroup (server problems). Please forward this to
> the list if you find it useful.
>
>
>
>
>
> Matthias Demuzere wrote:
>
>> Dear,
>>
>> I have a problem with writing data to an excell datasheet. My aim is
>> to write several columns to 1 same datasheet instead of writing the
>> different columns to different datasheets.
>>
>> This is what i did untill now:
>> openw,10,'C:\RSI\IDL56SE\Output-Escompte\MarseilleObservatoi re.xls'
>> for hour=0,192 do begin
>> printf,10,xtt(hour)
>> endfor
>> close,10
>>
>> openw,11,'C:\RSI\IDL56SE\Output-Escompte\MarseilleObservatoi re_T_E.xls'
>> for kk=0,192 do begin
>> printf,11,Tk(kk)
>> endfor
>> close,11
>>
>> Now I woulf like for example print in the first column the time
>> (hour), expressed by kk, going from 0 to 192 hours.
>> In the second column of the same datasheet, i would like to write xtt
>> (hour)
>> and in the third column of the same datasheet, i would like to write
>> Tk(hour)
>>
>> Can anyone help me with that?
>>
>> Kind Regard,
>>
>> Matthias Demuzere
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ENVI Headers
Next Topic: IDL and ENVI run on NTFS compressed drive

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 16:17:13 PDT 2025

Total time taken to generate the page: 0.72077 seconds