bugGNU Octave - Bugs: bug #43353, xlswrite in io-2.2.4 cannot add...

 
 

bug #43353: xlswrite in io-2.2.4 cannot add worksheet NAME to file with worksheet NAMExyz

Submitter:  Malte Hinrichs <maldje>
Submitted:  Sat 04 Oct 2014 12:07:20 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Malte Hinrichs Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 04 Oct 2014 04:10:19 PM UTC, comment #3: 

Applied the fix to _OCT_oct2gnm_.m and _OCT_oct2ods_.m as well

Philip Nienhuis <philipnienhuis>
Group Member
Sat 04 Oct 2014 04:00:55 PM UTC, comment #2: 

OK I applied your suggested fix and attributed it to you.

Elsewhere in the io package strcmp() is used to match worksheet names so matches are exact there. Only in the OCT interface this issue was present.

Thanks for reporting.

Philip Nienhuis <philipnienhuis>
Group Member
Sat 04 Oct 2014 09:13:31 AM UTC, comment #1: 

Confirmed.

I think you hit it on the nose, I'll apply your fix soon.
It may be that in other parts of the io package similar fixes are required.

Thanks

Philip Nienhuis <philipnienhuis>
Group Member
Sat 04 Oct 2014 12:07:20 AM UTC, original submission:  

The following gives the expected result:


xlswrite("file.xlsx",ones(3),"sheet","A1:C3","OCT")
xlswrite("file.xlsx",ones(3),"sheet0","A1:C3","OCT")


Reversing the order does not:


xlswrite("file2.xlsx",ones(3),"sheet0","A1:C3","OCT")
xlswrite("file2.xlsx",ones(3),"sheet","A1:C3","OCT")


This can be corrected by changing line 84 in private/__OCT_oct2xls__.m from


    wsh_number = strmatch (wsh, xls.sheets.sh_names);


to


    wsh_number = strmatch (wsh, xls.sheets.sh_names,'exact');



Malte Hinrichs <maldje>

 

(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 maldje (Submitted the item)
  • -email is unavailable- added by maldje
  •  

    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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-04 philipnienhuis StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2014-10-04 philipnienhuis StatusNone Confirmed
        Assigned toNone philipnienhuis
        Release3.8.0 other
        Operating SystemMac OS Any
    2014-10-04 maldje Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code