in reply to Issues with XLSX.pm,

I presume you are referring to Spreadsheet::XLSX? Is it properly installed? There should be additional pm files under the XLSX dir with the pm file.

However, the error suggests you are not using a Spreadsheet::XLSX object when calling the add_worksheet method.

There are very limited details in your post so it is hard to provide anything but guesswork. Could you please provide an SSCCE?

Replies are listed 'Best First'.
Re^2: Issues with XLSX.pm,
by bliako (Abbot) on Dec 15, 2021 at 09:40 UTC
    However, the error suggests you are not using a Spreadsheet::XLSX object when calling the add_worksheet method. 

    Which can mean (EDIT: among other things, see Re: Issues with XLSX.pm, in this node by Anonymous Monk) that he does not check if the call to create the object was successful:

    my $excel = Spreadsheet::XLSX->new('test.xlsx', $converter); die "failed to create" unless defined $excel;

    It's likely that instantiation failed because an XS module was not re-compiled re: In the middle of server upgrade because nobody told it to or simply failed.

    PS. I would like to see more error checking in Synopses, just for these cases. People just copy-paste that code without too much pondering.

    bw, bliako