cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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
Highlighted
Super User III
Super User III

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!

Learn more from my blog
Highlighted
Frequent Visitor

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)

Highlighted
Super User III
Super User III

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!

Learn more from my blog
Highlighted
Frequent Visitor

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.

Highlighted
Frequent Visitor

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"}
Highlighted
Super User III
Super User III

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!

Learn more from my blog
Highlighted
Frequent Visitor

Re: HTML to text -- \n throughout output

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

Highlighted
Super User III
Super User III

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!

Learn more from my blog
Highlighted
Community Support
Community Support

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

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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