bugGNU Octave - Bugs: bug #47197, octave-forge io package: xlswrite...

 
 

bug #47197: octave-forge io package: xlswrite has problems if string has &,<,>,"

Submitter:  Andreas Weber <andy1978>
Submitted:  Fri 19 Feb 2016 08:26:06 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 19 Feb 2016 05:21:54 PM UTC, comment #3: 
Philip Nienhuis <philipnienhuis>
Group Member
Fri 19 Feb 2016 01:08:28 PM UTC, comment #2: 

This has been fixed a while ago in io-2.4.1 which is scrutinized right now (by the current 1-person test panel). I expect (hope) it to be out soon.
Along the way I've fixed some related issues as well, notably filtering out unicode stuff from XML-based spreadsheet formats that Octave doesn't understand currently.

If you want you can grab the relevant code from the repo.

Closing as already fixed (can always be reopened if you find the new code not working properly)

Philip Nienhuis <philipnienhuis>
Group Member
Fri 19 Feb 2016 08:57:40 AM UTC, comment #1: 

I guess there are some chars which should be replaced. There is some code which does this if xlsx is read, for example _OCT_xlsx2oct_.m:126


valf1 = strrep (valf1, "&quot;", '"');
valf1 = strrep (valf1, "&lt;", "<");
valf1 = strrep (valf1, "&gt;", ">");
valf1 = strrep (valf1, "&amp;", "&");


But I can't find code for the other way (writing to xlsx).

Andreas Weber <andy1978>
Group Member
Fri 19 Feb 2016 08:26:06 AM UTC, original submission:  

GNU Octave Version: 4.0.0, io 2.4.0


fn = "mytest.xlsx";
wsh = "testme"
arr = {"foobar",
       "foo_bar",
       "foo%bar",
       "foo&bar",
       "foo$bar",
       "end"};

xlswrite (fn, arr, wsh, "A1:A6", "OCT")


In the generated file the last cell is "foo%bar", the strings afterwards are not written.

Andreas Weber <andy1978>
Group Member

 

(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 andy1978 (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
    2016-02-19 philipnienhuis StatusNone Fixed
        Open/ClosedOpen Closed
        Release4.0.0 other
    2016-02-19 andy1978 Summaryoctave-forge io package: xlswrite has problems if string has &quot;&amp;&quot; octave-forge io package: xlswrite has problems if string has &,<,>,"

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code