00000068
  $   	H403239_•I|¥‰ÓMjqØ‚¦ ë<óo¬ÅÄ  ï    	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>
  V   ˆl–äY>”Ša,ji@¿q–®61hß�þBP>³R²ÛM°oùÉƒuÇŸÈ_ˆI|¥�+V[(a–Ým_JJi?u8 ¸îÕ1hßÇ 	    #!/usr/bin/perl

###############################################################################
#
# A Spreadsheet::ParseExcel utility to display an Excel file in text format.
#
# The output maintains a spreadsheet like format for easy visualisation of
# the data layout of the file. For example, a small file might be displayed
# as follows:
#       ________
#     _| Sheet1 |__________________________________________________
#    |_____________________________________________________________|
#    |         ||                |                |                |
#    |         || A              | B              | C              |
#    |_________||________________|________________|________________|
#    | 1       || Hello          | Excel          |                |
#    |_________||________________|________________|________________|
#    | 2       || 1              | 2.00           | 3.000          |
#    |_________||________________|________________|________________|
#    | 3       || 2010-01-13     |                |                |
#    |_________||________________|________________|________________|
#    | 4       || A long string *|                |                |
#    |_________||________________|________________|________________|
#    * Note: Some data truncated to fit cells.
#
# reverse('©'), January 2010, John McNamara, jmcnamara@cpan.org
#

require 5.008;
use warnings;
use strict;
use Spreadsheet::ParseExcel;

# TODO. Should add configuration options. Maybe cell merging.
# Option to display upto a certain column/row. Should use Pod::Usage also.

my $cell_width        = 14;
my $left_column_width = 7;
my $space_padding     = 2;
my $cell_padding      = $space_padding + 1;
my $data_truncated    = 0;


main();


###############################################################################
#
# main().
#
# Run the main section of the program to extract the data from the Excel
# workbook and print it out in a text table.
#
sub main {

    my $filename = $ARGV[0] or die "Parsing error: must specify filename.\n";
    my $parser   = Spreadsheet::ParseExcel->new();
    my $workbook = $parser->parse( $filename );

    binmode STDOUT, ':encoding(utf8)';

    # Check for errors from parse().
    if ( !defined $workbook ) {
        die "Parsing error: ", $parser->error(), ".\n";
    }

    # Iterate through the worksheets.
    for my $worksheet ( $workbook->worksheets() ) {

        # Track truncated data in each worksheet so we can print a warning.
        $data_truncated = 0;

        # Get the cell range for the worksheet.
        my ( $row_min, $row_max ) = $worksheet->row_range();
        my ( $col_min, $col_max ) = $worksheet->col_range();

        # Max values of -1 indicate that the worksheet doesn't contain data,
        # in which case we set the max to (0, 0) so that one cell is shown.
        $row_max = 0 if $row_max == -1;
        $col_max = 0 if $col_max == -1;

        my $column_count   = $col_max + 1;
        my $worksheet_name = $worksheet->get_name();

        # Print a dialog style tab with the sheet name.
        print_sheet_tab( $worksheet_name, $column_count );

        # Print the column headings 'A' .. 'IV'.
        print_column_headers( $column_count );

        # Iterate through the cell data and print out each row.
        for my $row ( 0 .. $row_max ) {

            # The first item of the row data is the row number.
            my @row_data = ( $row + 1 );

            for my $col ( 0 .. $col_max ) {
                my $cell = $worksheet->get_cell( $row, $col );

                # Get the formatted cell values or else store a blank string.
                if ( $cell ) {
                    push @ro