Type Value2 - obj . If the range is only one cell, the actual type will be some primitive type (int, float, decimal, string). If the range represents several cells (your case), then the return value is a two-dimensional .NET array of type obj[,] .
You can pass the value returned by Value2 to the array and access it using indexers:
let vals = sheet.UsedRange.Value2 :?> obj[,] vals.[1, 1]
Note that the returned array is based on 1 (and not non-zero, as usual). The indexer returns obj again, so you need to pass the values ββto their actual type. Depending on your sheet, this will probably be a float or string:
let firstTitle = vals.[1, 1] :?> string let firstValue = vals.[2, 1] :?> float
(Suppose you have a heading in A1 and a number in A2)
source share