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

Get contents from Excel Table and paste into new excel sheet

Hello,

 

I have a spreadsheet in sharepoint with a number of tables.

On a weekly basis I'd like to email the contents of a specific table to a specific group of people. I don't want to email the entire spreadsheet as most of the information is not relvent. I'd like the flow to copy the table, create a new s/s then send this new s/s as a link or attachment.

 

I can get most of the flow apart from getting the contents from the table and adding it to a new document. 

Thoughts?

 

1 REPLY 1
sumurthy
Microsoft
Microsoft

You can use Office Scripts to achieve this. 

You will need two scripts: 

1. First script extracts the data fields that you need from the master Excel file. You can see beginning part of this video to see how to extract and pass data from one script to another: https://www.youtube.com/watch?v=dVwqBf483qo&feature=youtu.be&ab_channel=SudhiMurthy

 

2. On a newly created Excel file, you can run the next Office Script to create a new table. 

You can checkout this article to see how to create a new table - 

1. first you have to update the range with the data coming from step-1. 

2. add a table on the range that you just updated. 

https://docs.microsoft.com/en-us/office/dev/scripts/develop/scripting-fundamentals#ranges

 

You can then email the new Excel file's link to recipients. 

 

Please message if you need help.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (3,065)