Read .xls from sftp

Hi everyone!

I’m trying do get a .xls file from a sftp and read the data inside him.
A already got and download the files, but i can’t find how to read. Already try to use binary read with spreadsheet file, but can’t read his content. Somebody know how do it?

@Thiago_Luna welcome to the community.

mmm, weird it what you did seems like the right approach. Can you please share the workflow with me so that I can have a proper look? just select all the nodes then copy and then you can paste it here.

Thanks for reception @RicardoE105
Follow the nodes below:

     {
      "nodes": [
        {
          "parameters": {},
          "name": "Start",
          "type": "n8n-nodes-base.start",
          "typeVersion": 1,
          "position": [
            250,
            300
          ],
          "alwaysOutputData": false
        },
        {
          "parameters": {
            "protocol": "sftp",
            "operation": "list",
            "path": "/Sent/FromUs/Processed"
          },
          "name": "Processed List",
          "type": "n8n-nodes-base.ftp",
          "typeVersion": 1,
          "position": [
            440,
            300
          ],
          "credentials": {
            "sftp": "Test-Connection"
          }
        },
        {
          "parameters": {
            "protocol": "sftp",
            "path": "=/Sent/FromUs/Processed/{{$node[\"Processed List\"].json[\"name\"]}}",
            "binaryPropertyName": "="
          },
          "name": "Files-Downloaded",
          "type": "n8n-nodes-base.ftp",
          "typeVersion": 1,
          "position": [
            660,
            300
          ],
          "credentials": {
            "sftp": "Test-Connection"
          }
        },
        {
          "parameters": {
            "filePath": "=File_name.xls"
          },
          "name": "Read Binary File",
          "type": "n8n-nodes-base.readBinaryFile",
          "position": [
            850,
            300
          ],
          "typeVersion": 1
        },
        {
          "parameters": {
            "options": {}
          },
          "name": "Spreadsheet File1",
          "type": "n8n-nodes-base.spreadsheetFile",
          "position": [
            1060,
            300
          ],
          "typeVersion": 1
        }
      ],
      "connections": {
        "Start": {
          "main": [
            [
              {
                "node": "Processed List",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Processed List": {
          "main": [
            [
              {
                "node": "Files-Downloaded",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Files-Downloaded": {
          "main": [
            [
              {
                "node": "Read Binary File",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Read Binary File": {
          "main": [
            [
              {
                "node": "Spreadsheet File1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      }
    }

i don’t really know how indicate where the files that i downloaded from sftp really are.

Send you a private message.

Files do not get downloaded to the hard drive, they end up in the flow in the binary property you did define. So if you set the parameter “Binary Property” on the “Files-Downloaded” node to “data” and remove the “Read Binary File” node totally it should work fine.

1 Like

Thank you very very very much @jan !