changeset 12084:314024dde583 octave-forge

Convey proper file extension to OCT interface
author prnienhuis
date Mon, 30 Sep 2013 19:16:29 +0000
parents df769ca74431
children 20f1e936de8c
files main/io/inst/xlsopen.m
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/main/io/inst/xlsopen.m	Mon Sep 30 18:34:21 2013 +0000
+++ b/main/io/inst/xlsopen.m	Mon Sep 30 19:16:29 2013 +0000
@@ -266,8 +266,8 @@
   xlsinterfaces = getxlsinterfaces (xlsinterfaces);
 
   ## Supported interfaces determined; Excel file type check moved to separate interfaces.
-  chk1 = strcmpi (filename(end-3:end), '.xls');      ## Regular (binary) BIFF 
-  chk2 = strcmpi (filename(end-4:end-1), '.xls');    ## Zipped XML / OOXML
+  chk1 = strcmpi (filename(end-3:end), ".xls");       ## Regular (binary) BIFF 
+  chk2 = strcmpi (filename(end-4:end-1), ".xls");     ## Zipped XML / OOXML
   
   ## Initialize file ptr struct
   xls = struct ("xtype",    'NONE', 
@@ -319,7 +319,7 @@
 
   if ((! xlssupport) && xlsinterfaces.OCT)
     if (chk2)
-      [ xls, xlssupport, lastintf ] = __OCT_spsh_open__ (xls, xwrite, filename, xlssupport, chk1);
+      [ xls, xlssupport, lastintf ] = __OCT_spsh_open__ (xls, xwrite, filename, xlssupport, chk2);
     else
       error ("xlsopen.m: unsupported file format for OCT / native Octave")
     endif