[Top][All Lists]

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

[OT] Re: using xlswrite csvwrite

From: Philip Nienhuis
Subject: [OT] Re: using xlswrite csvwrite
Date: Fri, 8 Apr 2011 04:58:05 -0700 (PDT)

forkandwait wrote:
> Philip Nienhuis> writes:
>> Just to set the record straight:
>> xls format *is* supported outside Windows environment: gnumeric,
>>, , can read & write xls files. Yep, even Octave can
>> read/write xls / xlsx files on any platform where Java runs. Ironically,
>> Matlab can't ...  
> Fair enough, though Java is deal-breaker for me (no offense, but ...).  Is
> there
> a C library for reading xls binaries directly?

As Martin pointed out, Java (openjdk) is not such a problem these days - at
least as far as licensing goes. 
I've seen many negative comments on Java itself; I am not so very positive
about it either.
OTOH I was able to get a lot of work done by invoking ready-baked OSS Java
class libs made by other people. The biggest advantage I saw is that Java
allows for very good cross-platform support. To repeat myself: Octave beats
the competition by far in that respect.

If you care to type "xls C++" in Google you'll see many C/C++ "solutions"
between the 3,000,000+ hits, but (and here my handicap of little C++
proficiency jumps in) I get the impression that the vast majority is geared
towards M$ platforms, commercial and/or very often proprietary. But while
*writing* xls can also be very useful, there's much less to be found for
that, esp. for OSS.
BTW Initially I planned to use the C++ stuff, but that proved
too complicated - you'll catch the understatement.

Currently I'm experimenting with connecting Octave to OOo using the latter's
UNO bridge (through Java, sorry for that), but I already now I get the
impression that it wouldn't add much to the existing scripts in octave-forge
io package.

>> Not completely true.
>> Octave can neither import nor write csv files with mixed text and
>> numerical
>> "cells". 
>> (For that matter, ML can't either.)
> True, sort of.  With the latest dlmread, you can retain the structure of a
> numeric matrix and have an arbitrary value for unreadable cells (default
> is zero
> in ML, but that is stupid, so we can set to NaN.)  And we can read
> anything into
> a cell-array, though what you do with THAT afterward is another question.

Well, Octave (/ Matlab) is much more useful than only for pure math.
Reading this ML and e.g. ML's forums I'm often (pleasantly) surprised to see
the rich and widely varied fields of interest where Octave/ML is applied to.
Many people on this ML may primarily see it as mathematics tools; but at the
department I work for we primarily use it to manage, visualize and dig
around in the vast and heterogeneous data collection as Octave/ML is so
extremely flexible compared to all the other stuff around (databases,
spreadsheets, etc). In later stages of our analyses (where some math comes
in) we use it as pre- and postprocessor for dedicated number-crunching
Fortran codes.

>> But it is useful as it gives an opportunity to clarify on misperceptions
>> like "xls is poorly supported outside M$" etc.
>> Au contraire, it *is* widely supported. 
> Let me rephrase: while xls is (sort of) widely supported, there are lots
> of
> better, more open, and likely more sustainable options... ;)

...Like... ? And why: "better"?

I think the issue at hand is that xls is still so very dominantly used these
days. It's gonna take a while before all those "better", more open and
likely more sustainable options (I don't disagree on those latter two
qualifications) are sufficiently widely used to be able to do away with
Until then (perhaps when we have Octave-6.8.x or so) there's clearly still
need for .xls I/O.
"Worse" yet (for you), I experience that xls' dominant position is slowly
replaced by xlsx, rather than real "open" formats.

As to "better", particularly ODF: 
After having delved deeply into .ods (OOo Calc) in the course of the odsread
/ odswrite stuff I'm not so sure that it is superior (to xls). At least not
from a developers POV.

And thanks for an interesting discussion.  My feeling is that the OP just
> to get some work done, but he might find this an interesting introduction
> to
> some of the discussions around data formats and dependencies.

You're welcome.


View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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