Heather Williams wrote:
>
> I have set up an IDL table widget within a larger IDL widget, like so:
>
> ColLabels = SINDGEN(5) & ColLabels(0) = STRING('Slice location') &
> ColLabels(1)= STRING('Slice number') &
> ColLabels(2)=STRING('Concentration') & ColLabels(3)=STRING('Approx.
> dia') & ColLabels(4)=STRING('Vol. sig.> bg')
> RoiDataTable = WIDGET_TABLE(roiBaseG, ALIGNMENT=1,
> COLUMN_LABELS=ColLabels, COLUMN_WIDTHS=(width*1.5)/5, EDITABLE=1,
> RESIZEABLE_COLUMNS=1, RESIZEABLE_ROWS=1, SCR_XSIZE=width*1.5, XSIZE=5,
> YSIZE=10)
>
> This table is initially blank, but I then want to add a new row of
> data to every time a particular .pro is run, so I can see the results
> I have as I go along. I then want to export data within the completed
> table in a format which can be read by Microsoft Excel, as I already
> have a spreadsheet which does further (graphical) analysis very
> nicely.
Dear Heather
Are you sure? I have never seen nice or very nice graphical analysis
by excel. IDL stands for Interactive Data Language. There is no limit
in interpretation, analysis or visualisation of data by idl.
PRO wid_test
tab=CREATE_STRUCT(name='slice','location',0.0,$
'number',0L,$
'concentration',0.0,$
'dia', 0L,$
'vol',0.0)
b=WIDGET_BASE()
t=WIDGET_TABLE(b,value=tab,uname='tab')
WIDGET_CONTROL,b,/realize
FOR i=0,10 DO BEGIN
WAIT,1
new_tab={slice}
new_tab.location=5.5+i
new_tab.number=10+i
new_tab.concentration=3.7+i
new_tab.dia=1+i
new_tab.vol=2+i
tab=[tab,new_tab]
WIDGET_CONTROL,t,set_value=tab
WIDGET_CONTROL,t,ysize=N_ELEMENTS(tab)
WIDGET_CONTROL,t,set_value=tab
WIDGET_CONTROL,t,column_labels=TAG_NAMES(tab)
ENDFOR
result=STRING(tab.(0))+','+STRING(tab.(1))+','+$
STRING(tab.(2))+','+STRING(tab.(3))+','+$
STRING(tab.(4))
OPENW,lun,'file.csv',/GET_LUN
PRINTF,lun,result
FREE_LUN,lun
END
>
> After several hours of trying various WIDGET CONTROL commands, setting
> VALUE equal to an array I then edit, etc. etc. I have been unable to
> add any data to this table. Looking at the past mailings, it seems
> these problems are not uncommon and many of you recommend avoiding
> widget tables altogether. Your advice as to how to display this data
> as it is acquired and then export it (with or without the use of
> widget table) would be much appreciated.
The table is quite new I believe only 3 years old. Most other widget
elements are known very well.
My example uses an arrayed structure, then the tabular column types
could be different. A comma separated list should be readable by excel
if it's not to long. There is a limit by 65534 lines for Excel.
All operation which you are known by clicks from ms software
could be simple commands in the script. Normally routines I wrote got no
interactive interface. Because if a user request has do be done by
someone
he or she all the time has to interact with the job the computer
normally could
do itself. Many of our routines can run with different data on several
computers
without an operator sitting behind a screen.
There are several ways to share input data with idl processes or idl
routines.
If you are interested in our idl library you'll get it from
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
best regards
Reimar
>
> I look forward to hearing from you!
>
> Heather Williams
> Manchester PET Centre, UK
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
|