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.

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re: create xlsx by thanos1983
in thread create xlsx by gpremala

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.