Extracting Excel Data Chart and Storing into 2-D array in VB


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Extracting Excel Data Chart and Storing into 2-D array in VB

Hybrid View

  1. #1
    Eugene Lim Guest

    Extracting Excel Data Chart and Storing into 2-D array in VB


    Hello, I'm new to using Visual Basic, so I apologize if my question is confusing.
    So I have this Excel chart of data with two columns and numbers under these
    columns. I want to figure out a way to extract the data from Excel and store
    the chart contents into a 2-D array in VB consisting of the number of entries
    for its first dimension, then the two columns from the chart being the components
    of the second dimension. So for example, if I had 11 entries of numbers
    under both columns in the Excel chart, the new array in VB would have [11][2]
    as it's array specs. Any help would be greatly appreciated. Thanks.

  2. #2
    MuaDib Guest

    Re: Extracting Excel Data Chart and Storing into 2-D array in VB


    The Excell spreadsheet IS a 2 dimension array. If you check out the object
    browser for a little bit, you will figure it out.

    You need to access the Cell property of a sheet, and the cell property has
    2 parameters... rowIndex, colIndex. Use an imbeded for loop, and tear it
    apart and put it back together in your array.

    Sorry if I am a little parse... but I haven't worked with the Excell model
    in a while.



    "Eugene Lim" <eugene.lim@guidant.com> wrote:
    >
    >Hello, I'm new to using Visual Basic, so I apologize if my question is confusing.
    > So I have this Excel chart of data with two columns and numbers under these
    >columns. I want to figure out a way to extract the data from Excel and

    store
    >the chart contents into a 2-D array in VB consisting of the number of entries
    >for its first dimension, then the two columns from the chart being the components
    >of the second dimension. So for example, if I had 11 entries of numbers
    >under both columns in the Excel chart, the new array in VB would have [11][2]
    >as it's array specs. Any help would be greatly appreciated. Thanks.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center