bugGNU Octave - Bugs: bug #43354, xlsopen: Adding several worksheets...

 
 

bug #43354: xlsopen: Adding several worksheets to empty file creates corrupted xlsx-file (io-2.2.4)

Submitter:  Malte Hinrichs <maldje>
Submitted:  Sat 04 Oct 2014 12:23:40 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
   

Jump to the original submission

Fri 10 Oct 2014 03:12:42 PM UTC, comment #6: 

I tested it, and it solves the problem when writing to an empty file.

Thanks a lot!

Unfortunately I found more bugs which I will report shortly.

Malte Hinrichs <maldje>
Wed 08 Oct 2014 08:23:59 PM UTC, comment #5: 

@Malte:

Please:
- grab _OCT_oct2xlsx_.m from the usual place (see bug #43352)
- replace it in your io package install folder
- try again and report back.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 07 Oct 2014 02:39:59 PM UTC, comment #4: 

Thanks, it seems I had already made code along those lines when writing to xlsx. But, of course, with a few idiosyncrasies that now interfered with the fix for this bug here.

I have a bug fix ready & working but need some more time for first tests.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 07 Oct 2014 11:10:10 AM UTC, comment #3: 

the specifications for Office Open XML can be found at http://www.ecma-international.org/publications/standards/Ecma-376.htm

For the structural requirements, see the PDF file in the zip file "ECMA-376 4th edition Part 1", section "ยง 12.2 Package structure" on page 65 (PDF page 75).

(this also refers to bug #43331)

Anonymous
Sat 04 Oct 2014 09:47:49 AM UTC, comment #2: 

I tested it with and without your patch. The behavior is the same.

Malte Hinrichs <maldje>
Sat 04 Oct 2014 09:29:51 AM UTC, comment #1: 

Is this with or without the patches from bug #43331?

On my system it doesn't work properly either so the bug is confirmed.

FYI, I've changed OS to "Any" and Release to "other" as it refers to a platform-independent issue not relating to core Octave.

Please continue to indicate your own OS and Octave version.

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

The following creates a corrupted file:


fid=xlsopen("file.xlsx", 1, "OCT");
[fid,stat] = oct2xls(1*ones(3),fid,"a")
[fid,stat] = oct2xls(2*ones(3),fid,"b")
[fid,stat] = oct2xls(3*ones(3),fid,"c")
fid=xlsclose(fid)


A simple workaround consist in first creating the file and than adding more worksheets:


xlswrite("file.xlsx",1*ones(3),"a");

fid=xlsopen("file.xlsx", 1, "OCT");
[fid,stat] = oct2xls(2*ones(3),fid,"b")
[fid,stat] = oct2xls(3*ones(3),fid,"c")
fid=xlsclose(fid)


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

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-13 philipnienhuis StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-10-08 philipnienhuis StatusIn Progress Ready For Test
    2014-10-04 philipnienhuis StatusNeed Info In Progress
    2014-10-04 philipnienhuis StatusNone Need Info
        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-02a9.
    Corresponding source code