GetArray Issue

Posted by: griswald88 on 8 September 2017, 12:37 pm EST

  • Posted 8 September 2017, 12:37 pm EST

    I am using the GetArray method of the active sheet. In my example I have data in the first and last cell and thats it. I also have one hidden column in the grid (column 5). When I use GetArray (0,0,1,ColumnCount) I am getting that cell (0,1) contains data when in fact it should be cell (0,0). Does it move the hidden column's data to the front or something? I am not sure what is going on here, but it looks as though it is treating the columns in the array as 1-based...any ideas?
  • Replied 8 September 2017, 12:37 pm EST

    griswald88 -

    I tested this with the latest release and the returned values are correct.  Here's the code I tested with...

    FpSpread1.ActiveSheet.ColumnCount = 3

    FpSpread1.ActiveSheet.RowCount = 5

    Dim arr(,) As Object
    FpSpread1.ActiveSheet.SetArray(0, 0, New String(,) {{"One"}})
    FpSpread1.ActiveSheet.SetArray(4, 2, New String(,) {{"Three"}})
    arr = FpSpread1.ActiveSheet.GetArray(0, 0, 5, 3)


    FpSpread1.ActiveSheet.Columns(1).Visible = False

    MsgBox(arr.GetValue(0, 0).ToString())
    MsgBox(arr.GetValue(4, 2).ToString())

    Make sure you have the latest release.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels