How to make center aligned for all the datas in CSV output from Alteryx
- 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
Hi,
I have got the CSV output from Alteryx. but datas coming without proper format. certain columns coming in left aligned manner and certain coming in Right aligned.. certain column has both text and numbers.. so it has left aligned(for numbers) and right aligned(for text)..
Is there anyway to make all as center aligned?
Solved! Go to Solution.
- Labels:
- Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
a CSV output contains no formatting instructions. If you read a csv into another application (e.g. Excel), that application may apply formatting. If it thinks that a column is text, it will be left aligned. If it thinks that it is a number, it will be right aligned.
I'll forward this post to @SeanAdams for his feedback too.
cheers,
mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Karthick461
CSV is not having formatting information, meaning even you did formatting and save it in a CSV.
THe formatting information is lost when you open it again next time.
So Excel is not acceptable for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oh. Thanks for the update. I will try to make output as Excel , but do i have to use any other tool for formatting before excel output?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Karthick461
There are two options.
- Use the Preserve Formatting option when outputting as Excel, where you repare an Excel template first.
- Use Table tool as a reporting tool then output as an Exce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hey @Karthick461 - as @MarqueeCrew and @Qiu have said - .csv files are purely a data storage file format - for example:
a,b,c
d,e,f
... is a CSV data set.
Why do you see alignment when you open this up in Excel? Well - Excel looks at this data, and makes some assumptions about the types - and left aligns things that it guesses are dates or text, and right aligns numbers. If you want to see what's ACTUALLY in the CSV file - open it up in Notepad instead.
If you want more detailed formatting - there are 3 options:
a) you can use the reporting tools - there is great training on this and the team are very keen to hear feedback from users: Interactive Lessons - Alteryx Community
b) you can output to Excel using a hidden sheet - and then use formulae to do a much more professional looking output - @MarqueeCrew has done a lot of this and there may be a post that he can refer you to
c) you could use a Python library. I've not done this myself, but people in my team have - so this would be a google.com research project to get this up and running (the benefit being that if you get this running, that may be your first blog post on the community with a simple how-to guide).
Easiest by far would be to learn the reporting tools using the link I sent above (Interactive Lessons - Alteryx Community) and go from there.
Good luck @Karthick461
Sean
