bugGNU Octave - Bugs: bug #38756, xlswrite always truncates arrays...

 
 

bug #38756: xlswrite always truncates arrays to 256 columns because check on .xlsx extension is wrong

Submitter:  None
Submitted:  Wed 17 Apr 2013 09:53:19 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Vermylen Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.2
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 21 Apr 2013 05:57:23 PM UTC, comment #2: 

Reverted "fixes" in xlswrite.m, xlsopen.m and private/parse_sp_range.m. The latter two were not faulty.

In xlswrite.m, rather change suffix to test from 'xls' to '.xls'.
Not only does it match the original filename string indices, but it also checks for a real suffix (just imagine a filename 'indexlsx' - what file type would it be?)

Fixed in svn

Philip Nienhuis <philipnienhuis>
Group Member
Wed 17 Apr 2013 07:35:59 PM UTC, comment #1: 

Good catch!

I rarely use xlswrite myself, I only supplied it for the Matlab-compatibility seekers :-)   I rather use xlsopen-oct2xls-xls2oct-xlsclose sequences.

Anyway I'll fix this in svn. Note that the line should rather be

if (strcmpi (filename(end-3:end-1), "xls"))

because you can also (try to) write .xlsb, .xlsm and some other .xls? types. Whether that will ever be implemented in lower functions is uncertain, but xlswrite.m shouldn't be a limiting factor.
Within one or two weeks I hope I can make a new io package release (probably end of April / early May); it'll contain this fix.

I've also applied the fix i xlsopen.m and private/spsh_chkrange.m

Thanks

(OS changed to "any")

Philip Nienhuis <philipnienhuis>
Group Member
Wed 17 Apr 2013 09:53:19 AM UTC, original submission:  

Hi,

I am using the handy io package, and noticed that the checks on line  123 and line 133 are wrong. This causes the code to default to range "A1:IV65536" always instead of using range "A1:XFD1048576" for .xlsx files. I replaced both lines 123 and 133 with:

    if (strcmp (tolower (filename(end-3:end)), 'xlsx'))

and seem to be getting the desired behaviour for writing xlsx files with POI and java.

Kind Regards.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-04-17 philipnienhuis StatusNone Fixed
        Assigned toNone philipnienhuis
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code