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

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

[Octave-bug-tracker] [bug #44511] [OF] IO Package: xlsread cannot read a


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #44511] [OF] IO Package: xlsread cannot read a csv file
Date: Fri, 27 Mar 2015 21:26:15 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33

Update of bug #44511 (project octave):

                Priority:              5 - Normal => 3 - Low                
                  Status:                   Fixed => Need Info              
             Assigned to:                    None => philipnienhuis         
             Open/Closed:                  Closed => Open                   

    _______________________________________________________

Follow-up Comment #11:

OK I understand.
There are a few issues with what you want:

1. It isn't guaranteed to work unless Excel itself (COM interface) or
Libre/OpenOffice (UNO interface) is present. Those interfaces are the only
ones that support .csv I/O.

Excel/COM
-----------
xlsread.m is soon going to core Octave; I'm sure no core Octave developer
wants to have links to MS-Excel in core Octave.
Excel/COM is out of the question.

Libre/OpenOffice
-----------------
Support for LO/OOo in the io package is a bit wonky due to the arcane way the
UNO-Java bridge is set up on the LO/OOo side. I doubt if the UNO interface can
make it to core Octave.

Maybe there can be some remnant interfaces in the future io package that can
overload (shadow) core spreadsheet functions. But the very discussion about
how the spreadsheet io is to be transferred to core Octave hasn't started yet
- our priority is a new 4.0.0 release.

* Alternatives
Of course we can invoke parsecell.m (io pkg) after the call to csvread.m to
separate numerics and strings (just like it is done for the regular
spreadsheet functions). But there's no point in that as neither csvread nor
dlmread can read mixed-type delimited text files whatsoever.

In the io package there's csv2cell that *can* (and returns a cell array that
can be parsed by parsecell.m). But, it can _only_ read comma-delimited files
when invoked through xlsread as there's no way to convey the delimiter through
xlsread. 
I also fear that csv2cell will break on csv files made with Excel/<whatever>
on systems with e.g., a Dutch, German or Swiss locale - then the separator
might be a ";" rather than a comma.
In addition there's bug #44493 for Octave compiled for 64-bit systems.

Again, I'd like top repeat what I stated in bug #40993:
Use the right tools. IMO reading a csv file with Excel / xlsread is pure
overkill.

The only option is to invoke csv2cell() but first it needs to be tested if
that works properly and reliably on systems with locales that have a "," as
decimal separator.

I'll reopen the bug report and set Status to "Need info", "Priority" to
"Low".


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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