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

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Automatically reading Excel file at a starting row

DeepakTyagi
8 - Asteroid

 

I have a list of files and their starting point for data row, some like this:

 

FileNameDataRowStartCounter
c:/temp/file1.xlsx3
c:/temp/file2.xlsx6

 

I need to read this list and dynamically start processing reading data from the excel using the DataRowStartCounter. So as an example,  file1.xlsx i will read from row#3 and file2.xlsx i will read from row#6.

 

I don't see an option of sending and using DataTowStartCounter  in dynamic input data tool. Can someone please suggest a way.

3 REPLIES 3

Hi @DeepakTyagi 

 

You can achieve this using Alteryx Batch Macro 

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Batch-Macros/t...

 

Please see below. Hope it helps. Cheers!

 

christine_assaad_0-1627060655688.png

 

christine_assaad_1-1627060699645.png

 

Macro: 

christine_assaad_2-1627060740875.png

 

 

fmvizcaino
17 - Castor
17 - Castor

Hi @DeepakTyagi ,

 

For that, you will need to use a batch macro with 2 control parameters, one to change the file name and other to change the start import line. Be aware that your filename  must include the sheet name or all sheet names must be the same, depending on the way you have configured your action tool.

fmvizcaino_1-1627061061888.png

 

 

 

To learn more about batch macros, here is a link: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Batch-Macros/t...

To include this macro in your workflow, you can right click in your canvas and go to the last option.

Best,

Fernando Vizcaino

 

 

 

Tmanuela
8 - Asteroid

Hi, there is any solution to dynamically detect the first row of data, for example, if a field contains "date" it means that position should be the field row..? 

 

Would help me a lot!

Thanks!

Labels