bugGNU Octave - Bugs: bug #49075, Added two-dimensional array...

 
 

bug #49075: Added two-dimensional array support to Windows Forge package

Submitter:  None
Submitted:  Mon 12 Sep 2016 08:49:07 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  lostbard
Originator Name:  Ethan Biery Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.3
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 20 Sep 2016 09:18:27 PM UTC, comment #7: 
John Donoghue <lostbard>
Group Member
Mon 19 Sep 2016 05:37:05 PM UTC, comment #6: 

So your patch does not introduce a regression as far as we can see, fine.

It's up to JohnD as pkg maintainer to decide. You have my vote!

Philip Nienhuis <philipnienhuis>
Group Member
Mon 19 Sep 2016 01:10:27 PM UTC, comment #5: 

Thanks for pointing me in that direction.  Looks like it worked just fine!

--Ethan

GNU Octave, version 4.0.3
...
Octave was configured for "i686-w64-mingw32".
...

>> pkg load io windows
>> more off
>> io_xls_testscript("COM")


Testing .xls interface COM using file io-test.xls...

 1. Initialize arrays.

 2. Insert first empty sheet.
Checking requested interface(s):
COM*; (* = default interface)

 3. Add data to test sheet.

 4. Add another sheet with just one number in A1.

 5. Explore sheet info.

 6. Read data back.

 7. Tests part 1 (basic I/O):
    ...Numeric array... matches...
    ...Cellstr array... matches...
    ...Boolean... recovered...

 8. Repeat reading, now return formulas as text

 9. Tests part 2 (read back formula):
    ...OK, formula recovered ('=C2+D2').

10. Cleaning up..... OK
ans =
{
  [1,1] = COM
  [1,2] = +
  [1,3] = +
  [1,4] = +
  [1,5] = +
  [1,6] = +
  [1,7] = +
  [1,8] = +
  [1,9] = +
  [1,10] = .xls
}

>>


Anonymous
Sat 17 Sep 2016 04:10:32 PM UTC, comment #4: 

To do a regression test with Excel/COM:

1. Simply install io package (I assume you have your windows package version installed).
2. In Octave terminal:

pkg load io windows
more off
io_xls_testscript ("COM")

If that script works fine in all 10 steps you're off the hook.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 13 Sep 2016 08:14:35 PM UTC, comment #3: 

Thanks for pointing that out.  I'm not a COM expert either, but the existing code was able to support arrays of VARIENT variables (which is perhaps what the Excel COM object returns).  The COM object I was using returned numbers directly.  I fixed the Windows package code so that it should work when the COM object returns floats, ints, and chars (not just varients).
Good idea to regression test it against some Excel objects, to make sure I didn't mess it up.

Anonymous
Tue 13 Sep 2016 07:19:22 PM UTC, comment #2: 

Maybe completely beside the point, I'm not so familiar with COM internals, but already for a long time time the windows package could return 2D COM objects as an Octave cell array.
The io package's COM spreadsheet interface invokes that (see <io>/private/__COM_spsh2oct__.m)

It may well be that this relies on VB/COM/ActiveX functionality specific to MS-Office.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 13 Sep 2016 01:07:26 AM UTC, comment #1: 

Thanks for the changes - I will take a look and let you know if I have any questions.

John Donoghue <lostbard>
Group Member
Mon 12 Sep 2016 08:49:07 PM UTC, original submission:  

Hello,

I've been using the Windows package to get COM data from an external Active X control.  Up through the latest released version (1.2.3), the package did not support returning multi-dimensional data from a COM server (for example, a COM object representing an oscilloscope that returns a 2-dimensional array containing voltage and corresponding time values).

I modified the 1.2.3 version of the code to now support 2D arrays in most cases.  I've built it and tested it in Octave 4.0.0, 4.0.2, and 4.0.3, and it seems to work in my applications.  The attached file contains executables built with 4.0.3.

I'm sorry that I don't know how to build a true "diff" file, but the only code changes were in the _COM_.cc file.

I'm hoping others can confirm that this work, and will find this useful!

--Ethan Biery

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #38486:  windows-1.2.4.tar.gz added by None (963KiB - application/x-gzip - Source code and compiled files for windows package supporting 2D data)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-22 lostbard StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2016-09-13 lostbard StatusNone In Progress
        Assigned toNone lostbard
    2016-09-12 None Attached File- Added windows-1.2.4.tar.gz, #38486

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code