Alteryx Designer Desktop Discussions

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

Is there a way to convert CSV to XLSX without losing formatting?

rmartori
8 - Asteroid

So I have a workflow  that is used to reformat some excel files but it only works with XLSX files so i need to go open each file then save as XLSX then import. I was hoping there would be a way to skip that. Maybe even adding it to the beginning of the other workflow some how. Sort of an import CSV save as XLSX then import that XLSX.

6 REPLIES 6
ENix
8 - Asteroid

Is there a set template you are writing to? If so you could save a template and then import as CSV, do your processing and then write to a template using the Preserve Formatting On Overwrite option in the output tool:

ENix_0-1620677874347.png

 

apathetichell
19 - Altair

There's no problem with setting up a workflow to read in a .csv file and save it to excel - but I'm having trouble understanding why your workflow only works with .xlsx files and why you'd need to reimport your .csv file after you bring it into alteryx. Once it's in Alteryx why would you save it to excel to bring it back into Alteryx?

 

Isn't it easier to just run .csv files through your current workflow? perhaps turn it into a macro and feed in both .csv files and .xlsx files via the magic of a batchmacro?

 

 

 

mceleavey
17 - Castor
17 - Castor

Hi @rmartori ,

 

this makes no sense.

You do not need to import, save and then re-import.

Can you give us more information about what you're trying to achieve?

 

M.



Bulien

rmartori
8 - Asteroid

I am not sure why but whenever we input it as a CSV file it dumps everything into one column and I need to deliminate it out.

But I don't have anything to deliminate it by that wont ruin the workflow. We have a workflow that works if it is excel Basically the file itself looks like this.

Question #QuestionAnswer choiceAnswersResultsPercentagesCorrect AnswersJohn DoeJane SmithRobert Robertson
1Is the sky bluea  True 13/6520%    
1Is the sky blueb  False 45/6569%X XX
1Is the sky bluecNo Answer 7/6511% X  
       0%100%100%

 

However when I import the CSV file it imports everything into one column.

 

Question # Question Answer choice Answers Results Percentages Correct Answers Miguelina John Doe Jane SMith Robert johnson         
1 Is the sky blue a True 13/65 20% X X X X X X X X X X X X X         
1 Is the sky blue b False 45/65 69% X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X         
1 Is the sky blue c No Answer 7/65 11% X X X X X X X X X X X X X X X X         

 

 

 

The workflow takes the multiple XLSX files, one for each question. And makes it into a file formatted like below.


NameEmailQuestion 1Question 2Question 3Question 4

John Doe

john.doe@test.comCABA
Jane SmithJane.Smith@test.comBBBA
Robert RobertsonRobert.Robertson@test.comBCBB

 

The workflow itself works. I am just trying to find a way to fix the CSV part to make it just a touch quicker.

It doesnt help that the reports download the CSV files as polling[1].csv which means I need to rename them as well since excel doesnt like brackets. 

I just am trying to find a way to convert the csv into excel without losing the above format, so far the only way I have been able to do that is by literally loading each file into excel and then saving as XLSX

The problem is the size of the table will vary from report to report, sometimes 5 people some times 10 sometimes 100 some times the questions arent true false sometimes they are actually multiple choice with 5 options, or 4, etc. 

mceleavey
17 - Castor
17 - Castor

Hi @rmartori ,

 

This is because this is not a .csv format. You have no comma delimiters. Can you please post the original data with a description of what you're trying to do?

 

Thanks,

M.



Bulien

apathetichell
19 - Altair

You may also want to use a download tool directly in Alteryx so the filename is less troublesome - you can then work with the data and output and a more dynamic date - like the date could be appended to polling,,,

Labels
Top Solution Authors