Author Topic: How to get Specific Cell Values  (Read 829 times)

posttelink

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 1
    • View Profile
How to get Specific Cell Values
« on: July 21, 2021, 07:33:04 am »
Hello, I'm asking you a question while implementing grid. I want to receive Excel from the user and spray it on the grid, and I want to receive values from specific cells such as a1, a2, a3, and a4 and process the data. Can you show me an example of how to do?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to get Specific Cell Values
« Reply #1 on: July 21, 2021, 09:55:16 am »
Use Range object: https://paramquery.com/pro/api#method-Range

Value of a specific cell i.e., a1 can be obtained as

Code: [Select]
var val = grid.Range( { r1: 0, c1: 0 } ).value()[0];

Value of a range of cells i.e., a1, a2, a3, a4 can be obtained in form of an array with

Code: [Select]
var arr = grid.Range( { r1: 0, c1: 0, r2: 3, c2: 0 } ).value();