cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
doubles
Level: Powered On

HTML to text -- \n throughout output

I am trying to build a flow that takes SQL data and puts it in a text file that is saved on sharepoint. After a lot of experimenting, I settled on using the HTML table data operator, as it maintains the formatting I need in teh text file, with one exception. The HTML to text step inserts \n throughout the output of that step, causing line breaks throughout the file that did not previously exist in the data. Is there a way to prevent this from happening?flow config.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: HTML to text -- \n throughout output

 

Hi @doubles ,

 

It seems that using an HTML table is not able to achieve your needs, you need to try other methods.

Please consider the method below to achieve your needs. Note that a blank line is added to Value.

212.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

9 REPLIES 9
Super User
Super User

Re: HTML to text -- \n throughout output

Hi,

 

Could you try using the expression Replace to remove the \n values?



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!



doubles
Level: Powered On

Re: HTML to text -- \n throughout output

@abm  thank you for the reply. I did try replacing \n with '' and it did not work. This would also get rid of the line breaks I want to maintain between rows in the html table. In the HTML table step output, those line breaks are indicated by

</td></tr><tr><td>

 These are replaced by \n in the output of html to text (along with \n being interspersed throughout the output)

Super User
Super User

Re: HTML to text -- \n throughout output

Hi @doubles 

 

Thanks for your quick reply.

 

Did you tried replacing the HTML elements before the HTML table to text step?

 

 



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!



doubles
Level: Powered On

Re: HTML to text -- \n throughout output

@abm thank you -- yes I can do that, however I want to maintain those line breaks. I did try it just to see what the Html to text step would do and it still intersperses \n about every 80 characters or so.

doubles
Level: Powered On

Re: HTML to text -- \n throughout output

I think it probably has something to do with the line of code before the body in the output, but not sure if its possible to change these settings.

 

{"statusCode":200,"headers":{"Pragma":"no-cache","Transfer-Encoding":"chunked","Vary":"Accept-Encoding","Strict-Transport-Security":"max-age=31536000; includeSubDomains","X-Content-Type-Options":"nosniff","X-Frame-Options":"DENY","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"false","Cache-Control":"no-store, no-cache","Date":"Wed, 18 Dec 2019 19:03:04 GMT","Set-Cookie":"ARRAffinity=9227faf24135ad53dd065beee547fecb0ff01774dd3486105eba5bed7b415073;Path=/;HttpOnly;Domain=conversionservice-eus2.azconn-eus2.p.azurewebsites.net","Content-Type":"text/html; charset=utf-8","Expires":"-1","Content-Length":"292729"}
Super User
Super User

Re: HTML to text -- \n throughout output

Hi @doubles 

 

This might help

 

https://powerusers.microsoft.com/t5/Using-Flows/Removing-blank-lines/td-p/283116

 



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!



doubles
Level: Powered On

Re: HTML to text -- \n throughout output

Thanks, my data is too large to iterate through each record.

Super User
Super User

Re: HTML to text -- \n throughout output

Hi @doubles 

 

Thanks for your reply. The challenge here is to change the default behaviour and keep other new lines. There is no unique elements to keep it separate. We need to think about any other ways without using HTML table to text for this solution.



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!



Community Support Team
Community Support Team

Re: HTML to text -- \n throughout output

 

Hi @doubles ,

 

It seems that using an HTML table is not able to achieve your needs, you need to try other methods.

Please consider the method below to achieve your needs. Note that a blank line is added to Value.

212.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,255)