bugGNU Octave - Bugs: bug #45916, io 2.2.9: xlswrite 'OCT' doesn't...

 
 

bug #45916: io 2.2.9: xlswrite 'OCT' doesn't add strings to sheets created with LibreOffice

Submitted by:  Andreas Weber <andy1978>
Submitted on:  Thu 10 Sep 2015 07:36:01 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Philip Nienhuis <philipnienhuis>
Originator Name: Open/Closed: Closed
Release: otherOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 22 Sep 2015 04:09:01 PM UTC, comment #6:

Thanks for testing.

A new io-2.2.10 is ready, but I think I can add the named ranges stuff from bug #45996 as that is almost finished; see there.

Closing report as the fix is already in the repo.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Tue 22 Sep 2015 09:43:25 AM UTC, comment #5:

Philip, thank you for fixing this. With your attached file #34860 inserting strings works as expected.

Andreas Weber <andy1978>
Project Member
Fri 11 Sep 2015 01:16:14 PM UTC, comment #4:

The issue was that LO occasionally puts newlines between xml nodes at some places, Excel doesn't do that (save for the upper xml identification line as usual for xml files).
Not quite illegal, but it requires more robust code as the io pkg's OCT interface doesn't invoke a real xml parser to handle OOXML.
In addition, LO doesn't complain about unlinked-to xml files in the zip archive (that .xlsx really is) but apparently repairs the spreadsheet file silently and drops those dangling files. Excel at least tells you that it found inconsistencies.

I've replaced a few strrep calls by regexprep calls to be able to catch whitespaces between xml nodes; works fine now for me.

Please try attached _OCT_oct2xlsx_.m (replace the one in io-2.2.9/private/) and report back if this fixes the bug(s) for you.

(file #34860)

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Fri 11 Sep 2015 09:16:46 AM UTC, comment #3:

Some more investigations:

- Repeating all your steps with MS-Excel2013 works fine. "foobar" shows up in cell B2

- Starting off with LO, then Octave, then reading myfile.xlsx in Excel, Excel reports errors and repairs sheet1.xml

Repeating your steps (using LO) with a string in cell A1 rather than the number 12345, it all works fine as well. LO and Excel show "foobar" in cell B2.

I tend to think this is again a LibreOffice incompatibility just like in bug #45915, although there's no guarantee that Excel itself conforms to the formal specs.
BTW those specs are here:
http://www.ecma-international.org/publications/standards/Ecma-376.htm

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 10 Sep 2015 05:56:36 PM UTC, comment #2:

This one I can confirm with LibreOffice 5.0 and io-2.2.9

I have other fixes for the io package pending, so once fixed a new release will be coming soon.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 10 Sep 2015 05:48:58 PM UTC, comment #1:

Which io package version?

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 10 Sep 2015 07:36:01 AM UTC, original submission:

Tested with LibreOffice Calc Version: 4.3.3.2
Build-ID: 430m0(Build:2) on Debian Jessie.

Create "myfile.xlsx" with LibreOffice, add "12345" to A1. Close LibreOffice, run in Octave

Which returns 1 but the string "foobar" isn't visible when openend with LibreOffice. Adding integers with xlswrite works. Also if "myfile.xlsx" initially was created with xlswrite.

Andreas Weber <andy1978>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34860:  __OCT_oct2xlsx__.m added by philipnienhuis (25KiB - text/x-objective-c)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by andy1978 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Sep 2015 04:09:01 PM UTCphilipnienhuisStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 11 Sep 2015 01:16:14 PM UTCphilipnienhuisAttached File-=>Added _OCT_oct2xlsx_.m, #34860
      StatusConfirmed=>Ready For Test
      Operating SystemGNU/Linux=>Any
    Thu 10 Sep 2015 05:56:36 PM UTCphilipnienhuisStatusNeed Info=>Confirmed
      Assigned toNone=>philipnienhuis
    Thu 10 Sep 2015 05:48:58 PM UTCphilipnienhuisStatusNone=>Need Info
      Release4.0.0=>other

    Back to the top


    Powered by Savane 3.1-cleanup1