I am using a HTML Editor where I am trying to add my DataTable but I am not getting the headers of the Data Table .In my email body I am getting the row values without header.Since I already have Data Table, In HTML Editor I am selecting option Add Data Table.
How to include the header as well as the row values in HTML Editor.
Below is the screenshot which I received in Email where I am getting only rows without headers.But I want to include Headers also.
First you can use the below marketplace activity :-
Using this it will convert your datatable to an html string which can be replaced with the {{table}} string. [ HtmlContent.Replace(“{{table}}”,dataTable_HtmlString)]
The Datatable that you want to add in mail, just write it in an excel first and then read it again (uncheck add header) and add in mail using create html content.
@marina.dutta
While writing the data table to Excel u have to check the add headers property
And while reading it from excel uncheck add headers, and check the Preserve Format Property
And then pass that DT variable to HTML content , You will get headers in your output
Here one more thing .While building the Data Table I am using only headers. I am using Add row activity so that Dynamically the values are added to the Data Table. In Add Row Activity which Data Table value should I use , the DataTable of Read Range Workbook?
@marina.dutta
Use build dataTable output variable and Add rows to that Datatable
Let me brief you about the flow
Build DT(Eg:DT1)
Add rows to the DT1
Once your process state is finished , then in the end process state write DT1 to an excel (Add Headers should be checked)
4.Read the same Excel and store it in a new DT variable(eg:DT2)(Add headers should be unchecked)