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

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

[Octave-task-tracker] [task #15419] Implement Table I/O


From: Philip Nienhuis
Subject: [Octave-task-tracker] [task #15419] Implement Table I/O
Date: Wed, 29 Apr 2020 03:09:19 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0 Lightning/5.8.1

Follow-up Comment #9, task #15419 (project octave):

io-2.6.0 and 2.6.1 (bug-fix) have been released and received some testing. I
suppose it'll get much more "testing" once a new Octave-6.1.0 mxe-octave
installer is released.

There are always more bugs to fix and improvements to make but I think the
basic work on 
the io package side has been done now.

Some notes about data representation and I/O:

As to date and time formats, that's one of the very difficult things to get
together in spreadsheet I/O. The challenge is that:
* each spreadsheet format (.xls, .xlsx, .ods, .whatever) has its own internal
date, time and possibly datetime representation. Some formats even don't
really have it (e.g., .xls) and the date/time datatype has to be inferred from
formatting;
* each spreadsheet format (.xls, .xlsx, .ods, .whatever) may have several
"external" date representations dictated by formatting. Reading them requires
some flexibility so to say;
* each spreadsheet format (.xls, .xlsx, .ods, .whatever) has its own epoch;
* some spreadsheet formats have additional intermingled bugs w.r.t. epoch,
leap years, DST and maybe several others;

All of this is the reason that in the io package I didn't really bother to
chase maximum Matlab compatibility as regards date and time. I tried to return
dates as much as possible in the form of Matlab-compatible datenums (epoch
0000-00-0 or is it Dec 31, -1?).

While there, additional issues may be that the spreadsheet formats out there
support an interesting mix of supported data types. E.g., 
- Excel .xls supports just double, boolean and text. Only when using jJava
and/or ActiveX/COM there's a way to also "support" date and time;
- .xlsx does a little better and does support datetime (IIRC even without
epoch, it's just text);
- .ods internally has boolean but AFAIK in LibreOffice there's no API to
distinguish it from numerical 0 and 1. Some Java-based libraries (ODF Toolkit
and jOpenDocument) do support it, luckily;
- .ods does supports datetime, date, time, currency, percentages, double,
boolean, string;
- not all spreadsheet formats "cache" results of spreadsheet formulas (e.g.,
Gnumeric doesn't), but more tricky is that many others do but only if the
spreadsheet was "calculated" first. Yet even more tricky is that even if there
are cached formula results they may be outdated or even stale.

This isn't all meant as a rant (admittedly it looks like it, sorry) but merely
to motivate this opinion:
The message is that it may be wise to concentrate on just one, maybe two,
spreadsheet formats at first.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/task/?15419>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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