Is there a way to convert CSV to XLSX without losing formatting?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 # | Question | Answer choice | Answers | Results | Percentages | Correct Answers | John Doe | Jane Smith | Robert Robertson |
1 | Is the sky blue | a | True | 13/65 | 20% | ||||
1 | Is the sky blue | b | False | 45/65 | 69% | X | X | X | |
1 | Is the sky blue | c | No Answer | 7/65 | 11% | 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.
Name | Question 1 | Question 2 | Question 3 | Question 4 | |
John Doe | john.doe@test.com | C | A | B | A |
Jane Smith | Jane.Smith@test.com | B | B | B | A |
Robert Robertson | Robert.Robertson@test.com | B | C | B | B |
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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,,,
