Hello Martin: Martin Hoeijmakers wrote: > Dear Philip, > > I was trying the new version of Octave 3.6.0 for Windows, when I met the > following problem. > > I tried: > > ca{1,1} = "test"; > xls = xlsopen('testXLS.xls', 1, 'POI'); > xls = oct2xls(ca, xls, "werkblad"); > xlsclose(xls); > > I got: > > POI (& OOXML)*; (* = active interface) > error: deblank: S argument must be a string or cellstring > error: called from: > error: > C:\Octave\Octave3.6.0_gcc4.6.2\share\octave\3.6.0\m\strings\deblank.m at > line 72, column 5 > error: evaluating argument list element number 1 > error: > C:\Octave\Octave3.6.0_gcc4.6.2\share\octave\packages\io-1.0.16\spsh_chkrange.m > at line 80, column 2 > error: > C:\Octave\Octave3.6.0_gcc4.6.2\share\octave\packages\io-1.0.16\oct2xls.m > at line 524, column 39 > error: > C:\Octave\Octave3.6.0_gcc4.6.2\share\octave\packages\io-1.0.16\oct2xls.m > at line 163, column 17 > error: D:\pm-evt\src\testXLS.m at line 11, column 9 > > It seems that you have to give the fourth argument in oct2xls, which is > also a workaround: > > xls = xlsopen('testXLS.xls', 1, 'POI'); > xls = oct2xls(ca, xls, "werkblad", ""); > xlsclose(xls);
One shouldn't. The right fix would be to change line 113 of oct2xls.m (the actual function statement) from (watch out for line wrap): function [ xls, rstatus ] = oct2xls (obj, xls, wsh=1, crange=[], spsh_opts=[]) into function [ xls, rstatus ] = oct2xls (obj, xls, wsh=1, crange='', spsh_opts=[]) i.e., change [] into '' For the time being, you can easily do this yourself in a text editor. You could apply a similar fix to oct2ods.m and odswrite.m - they have the same bug. Afterward you might have to restart Octave to have it pick up the changes. I've updated oct2xls.m, odswrite.m and oct2ods.m in svn. Intriguing that this bug has been there for so long. I found it was introduced (for oct2xls) in rev. 7070, almost two years ago; in oct2ods & odswrite it was there from the start. Apparently these scripts aren't used so often.... or people tend to use xlswrite, that inserts a non-empty string arg to oct2xls for the spreadsheet range and so avoids the bug. It escaped my test suite as well. That'll be augmented soon. One of these weeks I might make a new release of the io pkg anyway, there were other bug fixes too that haven't been released yet. Thanks for reporting, Philip ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev