octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45498] Minor bugs with xlswrite from package


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #45498] Minor bugs with xlswrite from package io-2.2.8
Date: Fri, 10 Jul 2015 07:52:35 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1

Follow-up Comment #2, bug #45498 (project octave):

As to your first bug:
Actually this works as intended as well:

>> arr = [1 2; 3 4]
arr =

   1   2
   3   4

>> xlswrite('filename.xlsx', arr, 2, 'B2:Z100', 'oct')
Checking requested interface(s):
OCT*; (* = default interface)
ans =  1
>> xlsfinfo ('filename.xlsx')
  1: Sheet2                           (Used range ~ B2:C3)
ans = Microsoft Excel Spreadsheet


..although it isn't Matlab-compatible, acknowledged.

Again this is an example of Matlab's dependency on MS-Excel behavior:
When Excel creates a new spreadsheet file ("workbook") it -by default !-
creates three empty worksheets.
Now, Matlab relies on Excel's default behavior here and blindly assumes three
worksheets are there. Octave doesn't as it does *not* rely on Excel. It simply
creates just one worksheet called "Sheet2".
One can instruct Excel to just make one empty worksheet when creating a new
workbook. Not sure what Matlab would do then with Excel, I'll try later.

In the io package, when Excel is used (with the COM interface - "interface"
refers to support SW) and a new workbook is created, the various I/O routines
delete all extra worksheets except the one that was written to. This was done
to maintain similar behavior for all interfaces.

I'm not sure if we should follow Matlab here. Octave's (=io package's) other
spreadsheet interfaces simply have no provisions for this behavior. They can
be instructed to do so, but I'm afraid at the cost of possibly undue and
fragile overhead.
At the minimum I'll add a warning that just one worksheet is created.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45498>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]