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

 
 

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

Submitted by:  None
Submitted on:  Mon 12 Sep 2016 08:49:07 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: Ethan BieryOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.3
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 20 Sep 2016 09:18:27 PM UTC, comment #7:

Pushed https://sourceforge.net/p/octave/windows/ci/7c47cc3670df619d01f5db9007cac20d294c2bc3/

Changes will be part of the next release

John Donoghue <lostbard>
Project MemberIn charge of this item.
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>
Project 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>
Project 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>
Project 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>
Project MemberIn charge of this item.
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 File(s):
   
   
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
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 Sep 2016 11:33:37 AM UTClostbardStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Tue 13 Sep 2016 01:07:26 AM UTClostbardStatusNone=>In Progress
      Assigned toNone=>lostbard
    Mon 12 Sep 2016 08:49:07 PM UTCNoneAttached File-=>Added windows-1.2.4.tar.gz, #38486

    Back to the top


    Powered by Savane 3.1-cleanup1