Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

File browser tool with Alteryx Gallery API

ryUser_808
5 - Atom

I have a workflow on alteryx gallery which has a file browser input. 
I'm calling my workflow using the gallery APIs provided in the api-docs, the User V2 api, and by following the example in the Alteryx documentation.

I have got it working when the input is an excel file with a single tab with the tab name 'Sheet1'.
The request I send looks like below (from Alteryx documentation)

 

{
  "questions": [
    {
      "name": "my_file_browse_tool_name",
      "value": "file_id"
    },
  ],
  "priority": "1",
  "credentialId": ""
}

 


In my request how can I:

  • specify the tab name (when there are multiple tabs to choose from)?
  • select <List of Sheet Names> option on file browser question?

 

When I look at the request when executing the workflow on Alteryx gallery I see the following:

richardStevens_0-1614131723934.png

I tried to modify my request so it looks like as above but I get some unspecified errors. 

Any help is appreciated.


3 REPLIES 3
zsims
6 - Meteoroid

I'm running into a similar issue. I would love to know how to specify the Sheet Name when I post a file. 

 

Additionally, I'm having a hard time accessing the reference ID for the file that I post. I get an ID to return upon posting it, but I'm running into file path issues when I try to execute the workflow that uses that file

ShihabH
5 - Atom

Any luck figuring this out? We are currently building a similar solution and running into this same roadblock.

Chronos
5 - Atom

Hi @ShihabH,

 

I hope it's not too late to help! And I hope my solution can guide you to the right path or maybe you found out yourself and have a better solution than I do.

 

I did my solution with Python so I hope it's not a big problem, but should be the same with every other language and within Alteryx I suppose?

 

I'm still not 100% sure if it'll always work. Though in my testing with our Server/Gallery it seemed to do the correct thing.

 

How to specify the tab name (when there are multiple tabs to choose from) and how to select list of sheet names?

 

Step 1: Upload your Excel file to the standard API Endpoint /user/v2/inputfiles and save the resulting temp fileID.

 
 

Step1.png

 

Step 2: If you're trying to read a specific sheet you need to specify it in the same style you'd also do it in the Desktop version. If you're trying to get all sheet names... it's basically the same 😀.

 

Step2.png

 

And that should be it, right? Now just queue the job and it should work.

 

Step3.png