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 -<br><br>I tested this with the latest release and the returned values are correct.  Here's the code I tested with...<br><br>FpSpread1.ActiveSheet.ColumnCount = 3<br><br>FpSpread1.ActiveSheet.RowCount = 5<br><br>Dim arr(,) As Object<br>FpSpread1.ActiveSheet.SetArray(0, 0, New String(,) {{"One"}})<br>FpSpread1.ActiveSheet.SetArray(4, 2, New String(,) {{"Three"}})<br>arr = FpSpread1.ActiveSheet.GetArray(0, 0, 5, 3)<br><br><br>FpSpread1.ActiveSheet.Columns(1).Visible = False<br><br>MsgBox(arr.GetValue(0, 0).ToString())<br>MsgBox(arr.GetValue(4, 2).ToString())<br><br>Make sure you have the latest release.<br>
Need extra support?

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

Learn More

Forum Channels