#!/bin/sh
# excel2text - convert MS Excel files to ASCII text
#
# Written by Gary Johnson, Agilent Technologies <gjohnson@agilent.com>.

prog=${0##*/}
htmlfile=$1.html

if [ $# -ne 1 ]
then
    echo "Usage: $prog file" >&2
    exit 2
fi

if [ -f $htmlfile ]
then
    echo "$prog: $htmlfile already exists." >&2
    exit 2
fi

xlhtml -te $1 > $htmlfile
w3m -dump $htmlfile
rm -f $htmlfile
