RE: Sort table with dynamic order of fields [Part 1]

2002-07-31 Thread Felix Geerinckx
on Wed, 31 Jul 2002 17:47:09 GMT, Timothy Johnson wrote: > IMHO = In My Humble Opinion > > RTFM = Read The Freaking Manual > > TMAMYEHTU = Too Many Acronyms Make Your Emails Hard To Understand Strange, I didn't find that last one at -- felix --

RE: Sort table with dynamic order of fields [Part 1]

2002-07-31 Thread Timothy Johnson
: Sort table with dynamic order of fields [Part 1] > Using parallel arrays to store related data is not a good idea imho. I wanna ask for long... so what is IMHO and RTFM ?? > I would use an (anonymous) array of hashes here: > > my $persons = [ { ID => 'Foo', COUN

Re: Sort table with dynamic order of fields [Part 1]

2002-07-31 Thread Connie Chan
> Using parallel arrays to store related data is not a good idea imho. I wanna ask for long... so what is IMHO and RTFM ?? > I would use an (anonymous) array of hashes here: > > my $persons = [ { ID => 'Foo', COUNTRY => 'UK', GENDER => 'F' }, > { ID => 'Bar', COUNTRY =>

Re: Sort table with dynamic order of fields

2002-07-31 Thread Jenda Krynicky
From: Felix Geerinckx <[EMAIL PROTECTED]> > Using your datastructure, this would indeed be rather complicated. If > you could use the datastructure I proposed at the beginning of this > post, you could write I don't think it's wise to overwrite a function definition over an over again. Create an

Re: Sort table with dynamic order of fields

2002-07-31 Thread Felix Geerinckx
on Wed, 31 Jul 2002 12:56:17 GMT, [EMAIL PROTECTED] (Connie Chan) wrote: > What I have now is something like this : > @ID = qw (Foo Bar Blaz Bob); > @Country = qw (UK US HK HK); > @Gender = qw (F M M F); Using parallel arrays to store related data is not a good idea imho. I would use an (anonym

Re: Sort table with dynamic order of fields

2002-07-31 Thread Jenda Krynicky
From: "Connie Chan" <[EMAIL PROTECTED]> > > Are you sure it's a HashOfArrays and not an ArrayOfHashes? > > > > #HAO > > > > $data{$key} = ['Jenda', 'Krynicky', '[EMAIL PROTECTED]', ...] > > > > # AOH > > $data[$i] = {fname => 'Jenda', lname => 'Krynicky', email => > > '[EMAIL PROTECTED]', ...}

Re: Sort table with dynamic order of fields

2002-07-31 Thread Connie Chan
> Are you sure it's a HashOfArrays and not an ArrayOfHashes? > > #HAO > > $data{$key} = ['Jenda', 'Krynicky', '[EMAIL PROTECTED]', ...] > > # AOH > $data[$i] = {fname => 'Jenda', lname => 'Krynicky', email => > '[EMAIL PROTECTED]', ...} > What I have now is something like this : @ID = qw (Foo

Re: Sort table with dynamic order of fields

2002-07-31 Thread Jenda Krynicky
From: "Connie Chan" <[EMAIL PROTECTED]> > Thanks in advise =) > > In case, my source is not an Excel spread sheet, but a Hash Of Array. > So is that mean if I want to use this function, then I have to convert > my HOA to Spreadsheet, then use the method below to sorting about ? Or > anything I c

RE: Sort table with dynamic order of fields

2002-07-31 Thread Timothy Johnson
-Original Message- From: Connie Chan To: Timothy Johnson; [EMAIL PROTECTED] Sent: 7/30/02 11:43 PM Subject: Re: Sort table with dynamic order of fields Thanks in advise =) In case, my source is not an Excel spread sheet, but a Hash Of Array. So is that mean if I want to use this function, t

Re: Sort table with dynamic order of fields

2002-07-31 Thread Connie Chan
Thanks in advise =) In case, my source is not an Excel spread sheet, but a Hash Of Array. So is that mean if I want to use this function, then I have to convert my HOA to Spreadsheet, then use the method below to sorting about ? Or anything I can do more direct ? Or anything can let me directly

RE: Sort table with dynamic order of fields

2002-07-30 Thread Timothy Johnson
Here's a thought: You can convert the Excel spreadsheet to a .csv file and then use DBD::CSV to sort the fields. You should be able to do this using Win32::OLE as long as you run it on a system with Excel installed. The macro code fro saving the file to a .csv is: ActiveWorkbook.SaveAs Fi