Clearbuilt-Excelerator

 view release on metacpan or  search on metacpan

examples/create_test_excel_sheet  view on Meta::CPAN

#!/usr/bin/env perl
use Modern::Perl;
use Carp;
use FindBin;
use lib "$FindBin::Bin/../lib";
use Clearbuilt::ExcelErator;

# PODNAME: create_test_excel_sheet

my %spreadsheet = (
    'title'      => 'Test Title',
    'col_widths' => {
        '2-6' => 12
    },
    'rows' => [
        {
            height => 40,
            cells  => [
                {
                    value  => 'Honking Big Test Report',
                    across => 'A1:C1',
                    format => [ font => 'bold26', ],
                }
            ],
        },
        {
            cells => [
                '012345',
                { as_text => 1,            value  => '00012345' },
                { value   => 'Top Border', format => [ bt => 2 ] },
            ],
        },
        [
            '012345',
            { as_text => 1,               value  => '00012345' },
            { value   => 'Bottom Border', format => [ bb => 2 ] },
        ],
        [
            {
                value  => '=sum(A2:A3)',
                format => [ halign => 'right', type => 'dec1comma' ],
            },
            {
                value  => '=sum(b2:b3)',
                format => [ halign => 'right', type => 'dec1comma' ],
            },
            { value => 'Left Border', format => [ bl => 2 ] },

        ],
        [
            'above should be 24,690.0',
            'above should be 0.0',
            { value => 'Right Border', format => [ br => 2 ] },
        ],
        [],
        [ undef, 'The cell to the left should be blank!' ],
        [ { value => 'White Text, Blue Background', format => [ bg => 'blue' ] } ],
        [],
        [
            'Border Colors:',
            {
                value  => 'Gray 30%',

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.082 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )