Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hello Arik123,

I download your excel file 'aveidotvalues-3.xlsx' for testing purposes and this is what I found using Spreadsheet::XLSX:

#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Text::Iconv; my $converter = Text::Iconv -> new ("utf-8", "windows-1251"); # Text::Iconv is not really required. # This can be any object with the convert method. Or nothing. use Spreadsheet::XLSX; my $excel = Spreadsheet::XLSX -> new ('aveidotvalues-3.xlsx', $convert +er); print Dumper $excel; __END__ $ perl test.pl $VAR1 = bless( { 'SheetCount' => 0, 'FmtClass' => bless( {}, 'Spreadsheet::XLSX::Fmt2007' + ), 'Flg1904' => 0, 'Worksheet' => [] }, 'Spreadsheet::XLSX' );

I also test your excel file with Spreadsheet::Read and this is the output:

#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Spreadsheet::Read qw(ReadData); my $book = ReadData ('aveidotvalues-3.xlsx'); print Dumper $book; __END__ $ perl test.pl $VAR1 = [ { 'parsers' => [ { 'version' => '0.15', 'type' => 'xlsx', 'parser' => 'Spreadsheet::XLSX' } ], 'error' => undef, 'sheet' => {}, 'version' => '0.15', 'sheets' => 0, 'type' => 'xlsx', 'parser' => 'Spreadsheet::XLSX' } ];

I can not test any Windows spreadsheet modules because I am running a LinuxOS, but what I can see so far both modules they can not see your sheets. This is the reason that the data can not be populated. So what I would recommend, is either use a Perl module to produce your files or download Apache OpenOffice to create your spreadsheets. Remember openoffice is compatible with WindowsOS and also LinuxOS and so far all the files that I have populated it worked correctly with all the Perl modules.

Hope this helps, BR.

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

In reply to Re: Opening bad Excel files by thanos1983
in thread Opening bad Excel files by Arik123

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found