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

I got this simplest script to test whether I can use perl to make excel file. Under windows 10 bash environment, it will only create a 471 byetes file and the Excel can't open it. Then I put the same script on a Fedora12 computer and it works. Because I am going to use perl to generate an excel file with about 200000 rows, I really want to it to work on the windows 10 machine because the fedora machine is way too slow. Thanks.
#!/usr/bin/perl use strict; use Excel::Writer::XLSX; my $workbook = Excel::Writer::XLSX->new( 'simple.xlsx' ); my $worksheet = $workbook->add_worksheet(); $worksheet->write( 0, 0, 'Hi Excel!' );

Replies are listed 'Best First'.
Re: perl excel writer xlsx
by stevieb (Canon) on Sep 24, 2016 at 00:16 UTC

    Welcome gengtian, to the Monastery!

    Does it work if you install a Windows native Perl, such as Strawberry Perl, and run it on the normal windows cmd.exe command line?

    My work colleagues have been claiming issues with the new win10 bash integration, so perhaps you could try it natively and see how that goes.

      Thanks for suggestion. I will give it a try. I used to use activeperl but managing the packages is kind of messy to me.
Re: perl excel writer xlsx
by NetWallah (Canon) on Sep 24, 2016 at 00:21 UTC
    >> ..to generate an excel file with about 200000 rows..
    You would be much better served going to simple/free/fast/lightweight database like sqlite , which is cross-platform, and is very easy to install/learn/use.

            ...it is unhealthy to remain near things that are in the process of blowing up.     man page for WARP, by Larry Wall

      Thanks for suggestion. I later migrated everything to a server on my campus and got the job done. I used to just output the result as text file but I want one column of result if in multi-line format. Excel is handy to me.