realbasic-nug
[Top] [All Lists]

Re: 2D array to excel

To: "REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: 2D array to excel
From: William Yu <william at realsoftware dot com>
Date: Thu, 12 Aug 2004 15:20:57 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
So if you change the type back to SignedLong it works properly, but not for
Strings?  Sounds like you may have a found a bug.  I'd report it to our
feedback system, thanks.


Regards,
William Yu
william at realsoftware dot com


On 8/12/04 2:41 PM, "Sean Arney" <sean at rulessoftware dot com> wrote:

> William,
>   Thank you for the right direction here - This looks like what I need.
> Can you help me a bit more understanding this?  I can't seem to find much
> docs/examples on the OLE Parameter Class.  Here is my code that gets called
> from a button action.  I can get numbers to go over using your example, but
> here is closer to what Im trying to do - can you help where I am wrong here?
> I tried changing the param.Type to String, but it only is bringing the first
> one into Excel - the correct location, but just the one string shows up
> 
> Dim excel as new ExcelApplication
> Dim a(2, 1) as Variant
> Dim param as new OLEParameter
> Dim r as ExcelRange
> 
> a(0, 0) ="pete"
> a(1, 0) ="joe"
> a(2, 0) ="fred"
> a(0, 1) ="neat"
> a(1, 1) ="doe"
> a(2, 1) ="Red"
> 'param.Type = OLEParameter.ParamTypeSignedLong
> param.Type = OLEParameter.ParamTypeString
> param.Value2D = a
> 
> excel.Visible = true
> excel.WorkBooks.Add
> r = excel.Range("A2", "B4")
> r.Value2 = param
> 
> This is WAY faster - it looks great, thanks!
> 
> -seanA

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>