$NetBSD: patch-am,v 1.3 2002/01/10 17:54:32 taca Exp $

--- filter/excel.pl.orig	Fri Dec 15 14:37:41 2000
+++ filter/excel.pl
@@ -26,6 +26,7 @@
 
 package excel;
 use strict;
+use File::Basename;
 use File::Copy;
 require 'util.pl';
 require 'gfilter.pl';
@@ -33,15 +34,17 @@
 
 my $xlconvpath  = undef;
 my $utfconvpath = undef;
+my $convname = undef;
 
 sub mediatype() {
     return ('application/excel');
 }
 
 sub status() {
-    $xlconvpath = util::checkcmd('xlHtml');
+    $xlconvpath = util::checkcmd('xlhtml') || util::checkcmd('xlHtml');
 #    return 'no' unless defined $xlconvpath;
     if (defined $xlconvpath) {
+	$convname = basename($xlconvpath);
 	if (!util::islang("ja")) {
 	    return 'yes';
 	} else {
@@ -83,7 +86,7 @@
       = @_;
     my $err = undef;
 
-    if (util::checkcmd('xlHtml')) {
+    if ($convname =~ /xlhtml/i) {
     $err = filter_xl($orig_cfile, $cont, $weighted_str, $headings, $fields);
     } else {
     $err = filter_doccat($orig_cfile, $cont, $weighted_str, $headings, $fields);
