cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Benjimang Helper I
Helper I

Output CSV Table as Tab Delimited txt file

Hi All,

 

I am trying to create a Tab delimited txt file from a 'Create CSV Table' action. I understand we can create a string that contains a tab character, but some of my fields contain commas so I can't simply use a Compose action with a 'replace' expression. 

 

Is there any way to output as a tsv? Should I even be using the 'Create CSV Table' Action? I am using an array as an input that looks like this:

 

Array.jpg

 

Any help would be wonderful!

 

Cheers,

Ben

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Output CSV Table as Tab Delimited txt file

Hi @Benjimang

 

I am trying to figure out your problem with doing these steps:

before converting it into CSV file, relace these commas into another character (the one in the original text didn't exist).

For example:

"\"

Step 1: 

Annotation 2019-08-29 102442.pngAnnotation 2019-08-29 102008.png

 

 

Step 2:Annotation 2019-08-29 102508.png

Annotation 2019-08-29 102019.png

Step 3:Annotation 2019-08-29 102515.png

Annotation 2019-08-29 102028.png

Please have a try, I hope it can help you.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Super User
Super User

Re: Output CSV Table as Tab Delimited txt file

Hi @Benjimang ,

 

You could construct the line with delimited character tab as follows.

 

de1.png

 

Here is my output 

de2.png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Community Support
Community Support

Re: Output CSV Table as Tab Delimited txt file

Hi @Benjimang,

Yes, you could use the Create CSV table action, then add a create file action to create a CSV file as output.

There is an instance you can refer to:

Annotation 2019-08-28 134014.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Benjimang Helper I
Helper I

Re: Output CSV Table as Tab Delimited txt file

Hi @v-litu-msft ,

 

Your solution creates a comma separated file and I need a tab separated file. Some of the field I am using contain commas, so I cannot simply replace commas with tabs using a 'replace' expression. 

@abm  - I'm not sure how this will all complile into a tsv table and save out as a text file. Can you elaborate? I essentially have 25 columns and over 100 rows of data to compile

Community Support
Community Support

Re: Output CSV Table as Tab Delimited txt file

Hi @Benjimang,

 

CSV stands for "comma-separated values". Its data fields are most often separated or delimited, by a comma.

How about output an HTML table, its style just like the following:

Annotation 2019-08-28 151120.png

Annotation 2019-08-28 151053.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Benjimang Helper I
Helper I

Re: Output CSV Table as Tab Delimited txt file

Hi @v-litu-msft ,

 

Thank you for trying to help, but I'm not sure you understand what I'm trying to do. I need to arrive at a tab delimited txt file. Is there any way that I can either convert a CSV table, or skip the CSV Table action and compose the array I have built as a tsv file?

Community Support
Community Support

Re: Output CSV Table as Tab Delimited txt file

Hi @Benjimang

 

I am trying to figure out your problem with doing these steps:

before converting it into CSV file, relace these commas into another character (the one in the original text didn't exist).

For example:

"\"

Step 1: 

Annotation 2019-08-29 102442.pngAnnotation 2019-08-29 102008.png

 

 

Step 2:Annotation 2019-08-29 102508.png

Annotation 2019-08-29 102019.png

Step 3:Annotation 2019-08-29 102515.png

Annotation 2019-08-29 102028.png

Please have a try, I hope it can help you.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Benjimang Helper I
Helper I

Re: Output CSV Table as Tab Delimited txt file

Hi @v-litu-msft 

 

You may well have the answer here. I'll try it on my end and come back to you. Just to be clear:

 

1) Replace commas in fields before creation of CSV table with unusual charachter (# or similar)

2) Replace all commas in CSV table with Tabs

3) Replace all # (or similar) back to commas

 

I'll test

 

Benjimang Helper I
Helper I

Re: Output CSV Table as Tab Delimited txt file

Thank you  , This worked!
 
I had to make an adjustment though. I wasn't able to use expressions inside the 'Append to Array' action. I had to set up a bunch of Compose actions that used 'replace' expressions for each dynamic value I wanted to remove commas from. I then called on the outputs of those compose actions in the 'Append to Array.
 
Thanks, you put me on the right path!
 
I have to say, it's quite a lot of work to simply output a CSV as a TSV... the flow takes 15 minutes to run!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,104)