Hello gpremala,
Welcome to the Monastery. Please enclose the sample of your code in between code tags e.g. <code>.
It is very difficult to read your question and assist you the way that it is currently written.
Read more here: How do I post a question effectively?.
Update: I spend some time and I tried to decode your sample of code. From your sample of arrays it is correctly defined. e.g. @array = "1 2 3"; this is not exactly how array are defined. An array can be something like @array1 = (1, 2, 3);.
Second part that I noticed from your sample of code. The third array @array3 = "wns tns fep"; it is not an array it is a string the way that you demonstrate it on your hash of hashes. Sample of hash of hashes of arrays your code:
'ss_dir1' => { 'sr2r' => 'wns tns fep', 'hr2r' => 'wns tns fep', 'si2r' => 'wns tns fep', 'sr2o' => 'wns tns fep', 'hi2r' => 'wns tns fep', 'hr2o' => 'wns tns fep' } 'ss_dir2' => { 'sr2r' => 'wns tns fep', 'hr2r' => 'wns tns fep', 'si2r' => 'wns tns fep', 'sr2o' => 'wns tns fep', 'hi2r' => 'wns tns fep', 'hr2o' => 'wns tns fep' }
If I understand correctly you have data from a hash of hashes of arrays e.g.:
#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; my @array1 = ("ss_dir1", "ss_dir2", "ss_dir3", "ss_di4", "ff_dir1", "f +f_dir2", "ff_dir3", "ff_dir4", "ff_dir5", "ff_dir6", "ff_dir7", "ff_d +ir8"); my @array2 = ("sr2r", "hr2r", "si2r", "sr2o", "hi2r", "hr2o"); my @array3 = ("wns", "tns", "fep"); my %HoH; foreach my $hash (@array1) { foreach my $key (@array2) { $HoH{$hash}{$key} = [ @array3 ]; } } # print Dumper \%HoH; print Dumper $HoH{'ff_dir1'}; __END__ $VAR1 = { 'hr2r' => [ 'wns', 'tns', 'fep' ], 'sr2o' => [ 'wns', 'tns', 'fep' ], 'sr2r' => [ 'wns', 'tns', 'fep' ], 'si2r' => [ 'wns', 'tns', 'fep' ], 'hr2o' => [ 'wns', 'tns', 'fep' ], 'hi2r' => [ 'wns', 'tns', 'fep' ] };
Final point that it is not clear to me, what part are you trying to print to excel file? What exactly fields you want to print? For example A1 input A A2 input B etc. etc.
We need more information, so far what you done and where you got stack?
BR / Thanos
Looking forward to your update.
In reply to Re: create xlsx
by thanos1983
in thread create xlsx
by gpremala
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |