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

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

[Octave-bug-tracker] [bug #51512] of-io: Missing or wrong types when usi


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #51512] of-io: Missing or wrong types when using xlsread with OCT interface
Date: Tue, 25 Jul 2017 02:10:37 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46

Follow-up Comment #9, bug #51512 (project octave):

Singling out booleans as you do is the way to go, yes.

Cf. ECMA specs 's="<number>"' tags can be ignored as they just refer to
styles. So a regexp along the way of

## double
'<c r="\w+"(*: s="\d")(?: t="b")?>(?:<f.+?(?:</f>|/>))?<v(?:.*?)>(.*?)</v>'
## boolean
'<c r="\w+"(*: s="\d")(?: t="n")?>(?:<f.+?(?:</f>|/>))?<v(?:.*?)>(.*?)</v>'

(instead of current
'<c r="\w+"(?: t="[bn]+")?>(?:<f.+?(?:</f>|/>))?<v(?:.*?)>(.*?)</v>' )
)


should work better. The "(?:.......)" clauses (for tags that may not be
present) need attention. I've experimented a little yesterday evening, but
this has to be sorted out more rigorously.
A flowchart is needed to decide what data to read/tags to search for in what
order. Some regexps may even be dropped, hopefully leading to faster reading.
For reference I've attached worksheet1.xml from the files made by Excel2013
and LO5.2. What I usually do is just read them with fread(<fid, Inf,
"char=>char")' as text strings into the Octave terminal and then experiment
with regexp() until I get it right.

I think what Excel writes is still the reference (as that's the file "format"
most users will encounter); LO / OOo is not completely ECMA-compliant.

The timings you mention aren't that bad. Have you compared with Excel itself
(just reading, not tru COM interface per se)?


(file #41326, file #41327)
    _______________________________________________________

Additional Item Attachment:

File name: Ex13_sheet1.xml                Size:1 KB
File name: lo52_sheet1.xml                Size:2 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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