def convert_ref3d(token, _class)
    # Split the ref at the ! symbol
    ext_ref, cell = token.split('!')

    # Convert the external reference part
    ext_ref = pack_ext_ref(ext_ref)

    # Convert the cell reference part
    row, col = cell_to_packed_rowcol(cell)

    # The ptg value depends on the class of the ptg.
    if    (_class == 0)
      ptgref = [@ptg['ptgRef3d']].pack("C")
    elsif (_class == 1)
      ptgref = [@ptg['ptgRef3dV']].pack("C")
    elsif (_class == 2)
      ptgref = [@ptg['ptgRef3dA']].pack("C")
    else
      exit "Unknown function class in formula\n"
    end

    ptgref + ext_ref + row + col
  end
def convert_ref3d(token, _class)
    # Split the ref at the ! symbol
    ext_ref, cell = token.split('!')

    # Convert the external reference part
    ext_ref = pack_ext_ref(ext_ref)

    # Convert the cell reference part
    row, col = cell_to_packed_rowcol(cell)

    # The ptg value depends on the class of the ptg.
    if    (_class == 0)
      ptgref = [@ptg['ptgRef3d']].pack("C")
    elsif (_class == 1)
      ptgref = [@ptg['ptgRef3dV']].pack("C")
    elsif (_class == 2)
      ptgref = [@ptg['ptgRef3dA']].pack("C")
    else
      exit "Unknown function class in formula\n"
    end

    ptgref + ext_ref + row + col
  end
Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a
 ptgRef3dV.