2

I have a table in Microsoft Excel which generates a piece of string in A15 cell (Last blue cell in Col A), this piece of string contains a new line character which was created using char(10).

enter image description here

Now I have created a Microsoft Flow automation which reads this table and post it on one of my channel on Microsoft Teams. My problem is that the the new line character is totally getting discarded in the process and the entire string comes as one line in the final message on Microsoft Teams, Is there any way to fix this issue. 

I have added my flow below

enter image description here

This is how I get the Output message using Microsoft flow automation:

enter image description here

But this is what I really want the output message to look like:

enter image description here

This is the output of the test run where everything looks fine to me in here. I am unable to pin down the issue

enter image description here

Any suggestion or help guys will be appreciated.

Prashant Kumar
  • 501
  • 8
  • 26
  • 1
    It seems like your HTMLBody does not recognize Excel's ```Char(10)``` as a line break. Try to substitute these by the HTML version of linebreak ```
    ``` instead when you generate the string and see if that solves your problem.
    – Plutian Aug 28 '19 at 10:21
  • Thanks Man, That did work – Prashant Kumar Aug 28 '19 at 10:39
  • You're welcome, I've posted my comment as an answer as well in case anyone else stumbles upon your question when having a similar problem. – Plutian Aug 28 '19 at 10:50

2 Answers2

3

The flow is generated by HTML code, but the line break is set as the Excel value of a line break Char(10). HTML will not recognize this as a line break and ignore it. When generating the cell that is to be the output, replace the Char(10) with the HTML version <br> instead.

Plutian
  • 2,276
  • 3
  • 14
  • 23
0

Try to use \r\n\r\n in the message where you want to break the line.

Arun7even
  • 67
  • 1
  • 8