MAJOR=4
MINOR=40
DEVNAME=tty40
     ˆÂÁÆ‚p ¿ÅÄ X    ‹      Õ–_oÚ0Åßû)<?ì�\Âß•†LAD™¦iš�;ÄÂÄ‘mÊºO?‡Ð–QÐØÆD÷’87'×çg+Gö^ÃÎäó¨‹ÞOnúhôñ]¿×A¸ð©Ú&Añ¢æ”]€î #œ“µ V«•³ª:RÍ`2†Ä,D´Q<25û^^ó/�—0Bíy†Áü^JÙ7$cri4§¬‚‡°�t)˜††ã:åR½Q"Ú¨Áœ©”	 Šß1¥Á5cÆƒ¢•m›î^(é}>©{š	lŸµe®çÉ‡Ê÷L‚îˆà³´��Ì°ïñÅiµ1ðH¦BAÒ¹3ã1FD˜6þÒë¿Z˜$ÿÚ÷J‹Ûøm§=¸¶ìÈ‚y@ökn¬æû}¢² <æŒßâ[þýpÃ ÐLGŠg†ËôI
q5’BgÄ²Ö-A¢¶U…„þj5HôÓbŒ®ÇÝÁ$è�‹%¡y‹'w²]ØÅRƒ®Xd¤ºßà½_§¡Î®ÑÆ¬â³Ä`¡Ú«üÂX
ÊÔ6ã!:®#Í­ßâ¾írÇV¥\i”\·ä6�ÛlÕß ô"ü)³|?-Âãðÿ£ÐafòëKñ¾Lç©\¥Ûæí/¸×|‘MÓH*6�¹`Î\bOñH4·å6£5*Î„ÆC!mnìÂ=–O‚W¿<ž¶glEí`—ní\`YžlÏÐª'Ùµfõ\pKmf—mS<š[kþ5Úñ1h¢Å4Žlnÿ>�<VÀæÀåÁú<çAqˆübÁÅ_§
       ˆÂÁÆ‚p¿ÅÄ Y    ‹      Õ–M�›0†ïû+\zƒ�|H»Y J©¨‚Õ¶ªzpÀ	Ö@ÆišþúH´´J”m›FÍ…±áõð¼fŒÆxåLíèSà¢wÑäÞ>x6Â
Àcßp"§}0P5Àõ1Â©å`³Ù¨›¾Zð%D!¤b• œÅBMD‚­£¾gÝ #¥$‘‚‰ŒZ^žÐo¨X (Ö¢b	Àºâ�±9„P1A9ä„oe:"VEb@»P¦‚].c^$ÛúúŸ¤“«2o²ÖCn"E_IÆ–¹‰EQbË`«%ªxlb`q‘W0ÏHþ¤.Ù#’	öìé©‘Ö«-ƒ ”Ó…‰ßØ¦?5lùdE ‡5©cë�TI.¶`49*žµâû~<¡ÓjZÅœ•‚ù³¤Å®Õ¸Èª’H¯Cé å]U+INí‰ÚŒ`º~äxa»%I�â™îäÇÁV@8Ír§±(øvÇÞ&z�Ï«ò~?E;2Î–©ÀB
:¨ü;ëü)/6y×‘Ü­ƒ^l/GÞÔÇÖ~ÔEý…­§õúŠ¦+ziw£A¡#Â¾:xAŽ;³C/h}t&ç°¢«Ú%­x¾ã~ÄVÎ�ßSõ¿Æ_YBy—þØÉ˜PAdõ7á$ý�Ò»Eúp¤�Ò_ø0øã‰;Æ¶+vûáyjhxÉòÝÇ™t ¯ç€Gúí+(”åþ7µórî„4•ß„ë£OiVJú&\!½ìÍjú:\½l*Iß„OÿÂ®	vý¤Msj@Ûÿþ ™ÙXb    @   ˆl–Ü4ý(”Ð?J�zà[¸'Å£�þCdY¹)ã¡r7�üÿÈƒt-?Ç_ˆI|¥�+V[(ÇÆ í    #!/usr/bin/perl

BEGIN {
  use File::Basename;
  # Add current path to perl library search path
  use lib dirname($0);
}

use strict;
#use Spreadsheet::ParseExcel;
#use Spreadsheet::ParseXLSX;
use File::Spec::Functions;
use Getopt::Std;

##
# Try to load the modules we need
##
require 'module_tools.pl';
my(
   $HAS_Spreadsheet_ParseExcel,
   $HAS_Compress_Raw_Zlib,
   $HAS_Spreadsheet_ParseXLSX
  ) = check_modules_and_notify();

# declare some varibles local
my($row, $col, $sheet, $cell, $usage,
   $targetfile,$basename, $sheetnumber,
   $filename, $volume, $directories, $whoami,
   $sep, $sepName, $sepLabel, $sepExt,
   $skipBlankLines, %switches,
   $parser, $oBook, $formatter,
   $using_1904_date
);

##
## Figure out whether I'm called as xls2csv.pl or xls2tab.pl
##
($volume,$directories,$whoami) = File::Spec->splitpath( $0 );

if($whoami eq "xls2csv.pl")
  {
    $sep=",";
    $sepName="comma";
    $sepLabel="CSV";
    $sepExt="csv";

  }
elsif ($whoami eq "xls2tsv.pl")
  {
    $sep="\t";
    $sepName="tab";
    $sepLabel="TSV";
    $sepExt="tsv";
  }
elsif ($whoami eq "xls2tab.pl")
  {
    $sep="\t";
    $sepName="tab";
    $sepLabel="TAB";
    $sepExt="tab";
  }
else
  {
    die("This script is named '$whoami', but must be named 'xls2csv.pl', 'xls2tsv', or 'xls2tab.pl' to function properly.\n");
  }


##
## Usage information
##
$usage = <<EOF;

$whoami [-s] <excel file> [<output file>] [<worksheet number>]

Translate the Microsoft Excel spreadsheet file contained in <excel
file> into $sepName separated value format ($sepLabel) and store in
<output file>, skipping blank lines unless "-s" is present.

If <output file> is not specified, the output file will have the same
name as the input file with '.xls', or 'xlsx' removed and '.$sepExt'
appended.

If no worksheet number is given, each worksheet will be written to
a separate file with the name '<output file>_<worksheet name>.$sepExt'.

EOF

##
## parse arguments
##

# Handle switches (currently, just -s)
getopts('s', \%switches);
$skipBlankLines=!$switches{s};

# Now the rest of the arguments

if( !defined($ARGV[0]) )
  {
    print $usage;
    exit 1;
  }

if( defined($ARGV[1]) )
   {
     $basename = $targetfile = $ARGV[1];
     $basename =~ s/\.$sepExt$//i;
   }
else
   {
     ($volume,$directories,$basename) = File::Spec->splitpath( $ARGV[0] );
     $basename =~ s/\.xlsx*//i;
   }

my $targetsheetname;
my $sheetnumber;

if(defined($ARGV[2]) )
  {
    if ( $ARGV[2] =~ m|^\d+$| )
      {
	$sheetnumber = $ARGV[2];
	die "Sheetnumber must be an integer larger than 0.\n" if $sheetnumber < 1;
      }
    else
      {
	$targetsheetname = $ARGV[2];
      }
  }

##
## open spreadsheet
##

my $oExcel;
my $oBook;

$oExcel    = ne