Alteryx Designer Desktop Discussions

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

Need double quotes around text fields in .csv output

tlhoyt
Meteoro

I want my .csv (with my own named extension) to output with double quotes like the following:

tlhoyt_0-1686670202320.png

 

I have selected "Always" for Quote Output Fields. However, my output looks like this:

tlhoyt_0-1686670283064.png

 

Does anyone know how to get the output to look like the first picture when I have already selected "Always" for Quote Output Fields?

7 RESPUESTAS 7
acarter881
Cuásar

Hello, @tlhoyt.

 

Here's my test example (see attached). It seems to be working as intended. Please let me know if this isn't what you're referring to.

 

acarter881_0-1686672483865.png

 

Output when opened in Excel:

acarter881_1-1686672506285.png

 

Output when opened in Notepad++:

acarter881_2-1686672542727.png

 

cjaneczko
Púlsar

Can you use a formula tool a the end before your output?

 

'"' + [Field_That_Needs_Quotes] + '"'

 

 

DanielG
Cuásar

@tlhoyt  - see attached.  You have to do what @cjaneczko but also convert to string in formula.  I built this change off of @acarter881 's attached example.  I tried just converting it to a string and running it through but that doesnt work either.

DanielG
Cuásar
'"' + ToString([Field_That_Needs_Quotes]) + '"'
tlhoyt
Meteoro

I tried @DanielG response, and it looks right in Alteryx. But when I open the exported file in text editor, it looks like this:

tlhoyt_0-1686674471801.png

 

DanielG
Cuásar

@tlhoyt  - OK.  I apologize.  My default view of CSV is via Excel.  Which suppresses the extra quotes.  @acarter881's workflow does it with just the output settings.  As you can see from the screenshot you included, F3 was showing correctly with the quotes around it without making any changes from @acarter881 's version.  The "test" field was my mistake due to Excel.  The screenshot below is running it with his settings not mine.

 

DanielG_0-1686675291783.png

 

tlhoyt
Meteoro

I figured it out. I have 2 separate outputs and I was changing one but looking at the other after running (facepalm). Thank you all!

Etiquetas