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: Markus Mützel
Subject: [Octave-bug-tracker] [bug #51512] of-io: Missing or wrong types when using xlsread with OCT interface
Date: Wed, 19 Jul 2017 17:32:11 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0

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

                 Summary: of-io: Missing or wrong types when using xlsread
with OCT interface
                 Project: GNU Octave
            Submitted by: mmuetzel
            Submitted on: Wed 19 Jul 2017 09:32:10 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: other
        Operating System: Any

    _______________________________________________________

Details:

Attached are four example xlsx files created with Excel 2007, Excel 2013,
LibreOffice 5.2 and LibreOffice 5.3.
When reading from the Excel files, the cells that contain string formula
results are read as empty. The cells that contain Boolean values or formulas
are read as numerics.
When reading from the LibreOffice files, the cells that contain formulas with
numeric or logical results are read as strings. Boolean values are read as
numeric.

The following script displays the issues:

lio52 = xlsopen ("LibreOffice52_test.xlsx", 1, "oct"); 
rawarr_lio52 = xls2oct (lio52)
cellfun(@class, rawarr_lio52, "UniformOutput", false)

lio53 = xlsopen ("LibreOffice53_test.xlsx", 1, "oct"); 
rawarr_lio53 = xls2oct (lio53)
cellfun(@class, rawarr_lio53, "UniformOutput", false)

xls07 = xlsopen ("Excel2007_test.xlsx", 1, "oct"); 
rawarr_xls07 = xls2oct (xls07)
cellfun(@class, rawarr_xls07, "UniformOutput", false)

xls13 = xlsopen ("Excel2013_test.xlsx", 1, "oct"); 
rawarr_xls13 = xls2oct (xls13)
cellfun(@class, rawarr_xls13, "UniformOutput", false)



I will attach a patch that fixes these issues as soon as I have a bug number.
I could not figure out how to read Boolean values from formulas correctly from
the LibreOffice files. But I am inclined to blame LibreOffice since they tag
these cells as numeric (t="n") instead of Boolean (t="b"). The cells even show
up incorrectly (numeric instead of logical) when opening the files in
LibreOffice. So xlsread will read these cells as numeric, too. (Better than as
strings imho.)



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 19 Jul 2017 09:32:10 PM UTC  Name: Excel2007_test.xlsx  Size: 8KiB  
By: mmuetzel

<http://savannah.gnu.org/bugs/download.php?file_id=41252>
-------------------------------------------------------
Date: Wed 19 Jul 2017 09:32:10 PM UTC  Name: LibreOffice52_test.xlsx  Size:
5KiB   By: mmuetzel

<http://savannah.gnu.org/bugs/download.php?file_id=41253>
-------------------------------------------------------
Date: Wed 19 Jul 2017 09:32:10 PM UTC  Name: Excel2013_test.xlsx  Size: 8KiB  
By: mmuetzel

<http://savannah.gnu.org/bugs/download.php?file_id=41254>
-------------------------------------------------------
Date: Wed 19 Jul 2017 09:32:10 PM UTC  Name: LibreOffice53_test.xlsx  Size:
5KiB   By: mmuetzel

<http://savannah.gnu.org/bugs/download.php?file_id=41255>

    _______________________________________________________

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]