Excel::Writer::XLSX uses Archive::Zip internally. So you can test that this does the job right inside your provided Dancer2 handler.

But it is likely that the culprit is here: https://metacpan.org/module/Excel::Writer::XLSX::Workbook/source#L1195 where File::Find finds files and also in the previous line:

my $wanted = sub { push @xlsx_files, $File::Find::name if -f };

If for some reason the file paths are different not visible or not accessible inside Dancer then the above silently ignores them.

One simple way to debug this is to edit https://metacpan.org/module/Excel::Writer::XLSX::Workbook/source#L1195 and print messages etc. as to which files are found and added (whichpm Excel::Writer::XLSX::Workbook or perldoc -D Excel::Writer::XLSX::Workbook will tell you where said module is located)


In reply to Re: Incomplete file write under Dancer2 by bliako
in thread Incomplete file write under Dancer2 by realflash

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.