Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Spreadsheet::WriteExcel and Cava packager

by samuelalfred (Sexton)
on Apr 18, 2011 at 14:51 UTC ( [id://899954]=perlquestion: print w/replies, xml ) Need Help??

samuelalfred has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I have written a script using the Spreadsheet::WriteExcel module to create Microsoft Excel documents. I'm satisfied with the script and I now want to create an executable of it and to achieve that I'm using CAVA packager. CAVA has worked fine for me before but now I'm having some issues. When running the executable generated by CAVA I get the following error message:

Unrecognized character \x07 in column 1Compilation failed in require a +t <content >/AutoLoader.pm line 28. at <Packaged Modules>/POSIX line 25 BEGIN failed--compilation aborted at <Packaged Modules>/Spreadsheet::W +riteExcel: :Properties line 18. Compilation failed in require at <Packaged Modules>/Spreadsheet::Write +Excel::Wor kbook line 22. BEGIN failed--compilation aborted at <Packaged Modules>/Spreadsheet::W +riteExcel: :Workbook line 22. Compilation failed in require at <Packaged Modules>/Spreadsheet::Write +Excel line 17. BEGIN failed--compilation aborted at <Packaged Modules>/Spreadsheet::W +riteExcel line 17. Compilation failed in require at <Packaged Modules>/csct.pl line 13. BEGIN failed--compilation aborted at <Packaged Modules>/csct.pl line 1 +3.

If I remove the "use Spreadsheet::WriteExcel" command in my script the error message above dissapears but so does also the functionality in my script, of course. I have included Spreadsheet::WriteExcel in the Force include module list but the problem is still there. I don't really understand what goes wrong here so if anyone has any ideas on how to fix it, please share them with me!

Some additional information about my environment:

OS: Windows XP

Perl version: ActivePerl 5.10.1 Build 1007

Spreadsheet::WriteExcel version: 2.37

CAVA packager version: 2.0.40.377

Replies are listed 'Best First'.
Re: Spreadsheet::WriteExcel and Cava packager
by elef (Friar) on Apr 18, 2011 at 21:02 UTC
    I don't know what causes the bug you're getting, but I've had very good luck with Spreadsheet::WriteExcel and PAR::Packer. If you just need a .exe and you don't insist on using CAVA to make it, give pp a try. It has always treated me well. Run it with the -x switch to make sure no necessary module is skipped.
Re: Spreadsheet::WriteExcel and Cava packager
by markwx (Acolyte) on Apr 18, 2011 at 23:42 UTC
    Hi, Looks like there is an issue with your Cava install. Uninstall Cava. Delete anything left behind in install directories (their should not be - but something appears to be wrong) Re-install Cava. I have tested loading SpreadSheet::WriteExcel with ActivePerl 1007 using both current Cava 2.0.42 and your version 2.0.40. All seems to work OK.

      I tried to uninstall and then re-install the latest version of CAVA but I still get the exact same error message.

      It could be added that I some years ago did the same procedure with an older version of CAVA (and possibly older version of Spreadsheet::WriteExcel) and then it all worked as it should. Unfortunately I'm not able to find this old version so I can't open the project I used then. Tried to use the project converter in the latest version to open it but it doesn't work...

        Hi, I'm part of Cava development.
        Why not post to the Cava help list?
        Anyhow, if you run your exec in diagnostics mode it should tell you exactly where it failed.

        It appears to be failing during POSIX AutoLoad. Have you edited your POSIX module or autoload files locally?

        I have no problem building a script with Spreadsheet::WriteExcel / POSIX?

        Have you tried incrementing the release number?
        $ perl -le "binmode STDOUT; print chr($_) for 0 .. 43" > notperl.pl $ perl notperl.pl Unrecognized character \x01; marked by <-- HERE after <-- HERE near co +lumn 1 at notperl.pl line 2. $ perl -Mdiagnostics notperl.pl Unrecognized character \x01; marked by <-- HERE after <-- HERE near co +lumn 1 at notperl.pl line 2 (#1) (F) The Perl parser has no idea what to do with the specified char +acter in your Perl script (or eval) near the specified column. Perhaps +you tried to run a compressed script, a binary program, or a directory as a +Perl program. Uncaught exception from user code: Unrecognized character \x01; marked by <-- HERE after <-- HERE + near column 1 at notperl.pl line 2. at notperl.pl line 2
        If the source isn't mangled, then maybe a use utf8; is missing, or a
        export LANG=...
        is misplaced ( something to do with locales... )

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://899954]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found