Alteryx Designer Desktop Discussions

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

How to make Dynamic Input to read data as V_String always

tanja90
7 - Meteor

Hi all,

 

I have excel file with 11 sheets and the number of sheets will grow. All sheets have the same number of columns and naming convention. I'm reading data from all sheets using Dynamic Input, but the problem occurs when Alteryx recognizes one column from one sheet as Double and same column it recognizes as V_String when it reads from different sheets. In excel file, all columns are type text. 

Is there any idea how to bypass this problem? I want Alteryx to read this column always as V_String, not sometimes Doble, and sometimes V_String.

 

Example of data in attachment (example1,example2). In sheet image is the example of real scenario.

 

Thank you for your time.

 

4 REPLIES 4
Qiu
20 - Arcturus
20 - Arcturus

@tanja90 
Alteryx is not allowing the mixed data type.

Maybe we can do something like this.

1209-01.PNG

AngelosPachis
16 - Nebula

Hi @tanja90 ,

 

Unfortunately I wasn't able to recreate the error you are getting with the provided dataset. I used a dynamic input to load in the different sheets and Alteryx read all columns as V_String.

 

A way I would suggest however to tackle this issue is using a batch macro.

 

AngelosPachis_0-1607520193985.png

 

In this batch macro, I am feeding in the different sheet names in my control parameter (so every time the batch macro runs the sheet name will change and a different sheet will be read). And then I have included a select tool to force the data type to be V_String for all columns.

 

Now even if Alteryx reads a column as a double, that select tool will convert it into a V_String, and output the data in the correct format.

 

AngelosPachis_1-1607520343383.png

 

Give this a try and let me know if it worked for you. 

 

Cheers,

 

Angelos

 

AkimasaKajitani
17 - Castor
17 - Castor

Hi @tanja90 

 

Dynamic Input tool need the same schema files that are the same Field name and field type.

 

I always use the Batch Macro to read the different schema Excel files.

This is very simple Batch macro.

 

But @AngelosPachis  shows you how to make it for you, so I tell you more easy Macro that you only download.

Excel Opener macro.

How to use it and how to read the Excel files:

https://community.alteryx.com/t5/Engine-Works/The-Ultimate-Alteryx-Holiday-gift-of-2015-Read-All-Exc...

How to get the Macro:

https://gallery.alteryx.com/#!app/Read_All_Excel_Files/58dd51b3a18e9e18fca64172

 

tanja90
7 - Meteor

@AngelosPachis this macro did a job perfectly!

Thank you all very much for your replies 🙂

 

Labels