Extract value from specific cell in spreadsheet

Hi,

I’m trying to extract the data from a specific cell in Excel, and I think I’m either getting the syntax wrong, the n8n node isn’t working properly, or there is something wrong with the spreadsheet.

As a starter for 10, can somebody tell me whether the syntax is correct in the attached image?

I’ve also just switched the range to the a simple string value of H16, and I’ve also just stipulated the number 16 - doing the latter actually gives me every row from 16 onwards, which contains my data, but I need to extract data from specific cells.

Help please!
Scott

Hi @scottjscott, reading a single cell is somewhat tricky because n8n would expect key-value pairs by default. So you would need to read at least two rows, with the value from the top row being considered the column header. Meaning if you want to read cell H16 from a sheet, you could specify a range like H15:H16:
image

Alternatively, you could set Header Row option to false in which case a single cell range like H16 would work fine:
image

The latter would return an array though, so you would need to convert it into a normal string using for example the Item Lists node:

Example Workflow
{
  "nodes": [
    {
      "parameters": {
        "fieldToSplitOut": "row",
        "options": {}
      },
      "name": "Item Lists",
      "type": "n8n-nodes-base.itemLists",
      "typeVersion": 1,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://go.microsoft.com/fwlink/?LinkID=521962",
        "responseFormat": "file",
        "options": {}
      },
      "name": "Download Excel File",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "options": {
          "headerRow": false,
          "range": "H16"
        }
      },
      "name": "Spreadsheet File",
      "type": "n8n-nodes-base.spreadsheetFile",
      "typeVersion": 1,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "fieldToSplitOut": "row",
        "options": {}
      },
      "name": "Item Lists",
      "type": "n8n-nodes-base.itemLists",
      "typeVersion": 1,
      "position": [
        900,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Download Excel File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Excel File": {
      "main": [
        [
          {
            "node": "Spreadsheet File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Spreadsheet File": {
      "main": [
        [
          {
            "node": "Item Lists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Hope this helps!

Worked perfectly - thanks @MutedJam !

1 Like