cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
venseben
Helper IV
Helper IV

Create word fil and insert table

Hi all. I have a set of SharePoint lists with data, and have created i Word template that gets data into the template when I choose to create a new documet, and convert it to a PDF file afterwards. This runs like a charm. However, I would like to instert a table in the file content, and that gives me some headache. I would like to achieve, that when the file is created, it has both the file content and the table inside, but I cannot get it to work. Can anyone of you guide me in the right direction? This is what the flow looks like:

 

I have the output from the "TDDSStyle kvalifikationloen" that I somehow want to put into the file content, but as mentioned before, I cannot get it done. It gives me a corrupted file I am unable to open.

BuildFlow.PNG

Thanks in advance

 

/Frank

Denmark 

1 ACCEPTED SOLUTION

Accepted Solutions

Sorry for my lack of words. You have to change .docx to .doc if possible. maybe this will work for the table, and you can also put <head> tags for beautify your table.

View solution in original post

6 REPLIES 6
emseki
Microsoft
Microsoft

Hi, please try to fill "file content" with HTML tags. For example, <html><body>...</body><html> with html table.

 

HI @emseki  and thanks for a quick reply. I am still having trobule creating the file when I try to combine the file content with the html table. Look at the output, it is not good. The Output action is an html table created with data from a SharePoint list.

FlowError.PNG

Have you any clou of what I am doing wrong here?

 

/Frank

Sorry for my lack of words. You have to change .docx to .doc if possible. maybe this will work for the table, and you can also put <head> tags for beautify your table.

View solution in original post

Hi again @emseki, and once again thanks for a quick reply. I have done som tests according to your answers, but still with no luck. If I change the document from .docx to .doc I am not able to get the library metadata inserted in the Word text with quick parts. It seems taht this in only working i .docx. I can create a .docx file or a .doc file with only the table inside, no problems, but I am still unable to inset both the table and the file content in the same document. Du I have to use som sort om Compose action to get this to work? ☹️

 

/Frank

Hi, sorry I noticed you're putting file content as a dynamic content to file content column. I guess the file content you are putting is a word file and it is not html..  To edit file content via Power Automate, "File content" column should be html format, like emails... Once you got html format, you can edit it with string functions.

In that situation, please note that you can edit only within body tags.

Hi @emseki and THX again for taking you time to answer. I have tried to get the file content from the Word file converted into html, but with no luck ☹️. Can you guide me in any direction of hot to convert Word content into html? I cannot find the right way to do it. Sorry for beeing so dumb!!!

 

/Frank

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (81,825)