juacas / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

BABEL: Dates and Escaped Characters from Excel #83

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
As far as I can tell there's no easy way to get BOTH special characters
(like e-accent -- \u00e9) and dates from Excel into Exhibit JSON. If you
cut and paste from Excel into the text window the special characters don't
come through correctly (some problem with character sets other than UTF-8,
I think) but a date field comes through as the characters in the
representation in Excel (eg. 1989-04-18), which I think is what you want.
If, however, you point the Babel application at the file that has date and
text fields with special characters, then the special characters come
through fine but the dates come through as big numbers (e.g. 32616), which
is the internal representation. I cannot find a way to make both work in
the same spreadsheet. If I try to put "\u00e9" in the text, for example, I
get "\\u00e9" in the JSON. That is, it escapes the escape.

I'm working around this by translating the date fields in Excel into text,
which is actually a slightly involved process because Excel doesn't, as far
as I know, have a real direct way of doing this. So there is a workaround,
but the situation doesn't seem ideal to me.

Of course, if I simply don't understand something about how Babel deals
with dates I'd certainly like to know.

[Reported by Roger Cutler on simile.mit.edu]

Original issue reported on code.google.com by stefano.mazzocchi@gmail.com on 25 Mar 2009 at 6:34

GoogleCodeExporter commented 8 years ago

Original comment by stefano.mazzocchi@gmail.com on 25 Mar 2009 at 7:19