Macro to convert XLSX to CSV
- 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
I have 300 excel XLSX files that I need to get converted into CSV comma delimted files. I typically use a VBA script in excel, that goes to the folder where I have the files saved and goes through and creates a copy of the excel file as a CSV format. I would like to be able to do this in Alteryx.
Can someone help me figure out a batch macro that that do this?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @aamerin
Here's an example of how you could do it.
You need to change the Directory Tool to the folder where your XLSX files are.
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @aamerin,
Here is an example of how you could build it as an app where all you have to do is select the input and output folders. You have to run it as an app, and not just a standard work flow. Let me know if you have any questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you send me a screen shot of your workflow? I have an older version of Alteryx and can't open your file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Jbrooks Can you send me a screen shot of your workflow? I have an older version of Alteryx and can't open your file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Accidentally posted twice use the one below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @aamerin,
Here are the screen shots, i have broken it out into three pieces:
The first is the actual app, which takes two inputs(The two folder browsers). The First browser creates a list of all .xlsx files in the chosen directory, then second is the output directory and through the formula and append tools we create a final file path. All that is fed into a batch macro.
The batch macro controls three things, The first sets the file to get all the sheet names from an excel file and the second sets the file name in the dynamic input tool (i was having issues with sheets so that is why i switched to this method). The third one is overriding the output file name to the final file name we built in the app step.
Here is a quick screen shot of the set up for the first two action boxes. The third one is just set to the default update value.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks so much for your help. I'm getting stuck in the initial workflow. My action is giving me an error. Any idea why? Also, what did you have in your text file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think its because you have nothing in the text input. You can put whatever you want in there, it just has to be something because that's what the action is replacing. See attached photos for more info
