Excel automation to copy and paste in to a Microsoft Teams channel

Anonymous
2023-12-07T00:52:07+00:00

I need Excel to be able to copy cell data and paste it in to a Microsoft Teams channel as an automation or flow.

When I enter in the phrase "In Progress" in to cell J1then i need the cell data in G1 and i1 to copy and paste in to a specific Microsoft Teams channel. Is this possible? Thanks in advance! :)

Microsoft 365 and Office | Excel | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

19 answers

Sort by: Most helpful
  1. Anonymous
    2023-12-14T07:53:30+00:00

    Dear RomeoV2024,

    The For a selected row trigger **** is only applied to the .xlsx file. The macro-enabled file can't be got from the action.

    As the macro can only be ran in the Office desktop client, it can't be ran with a cloud flow to populate the results into Teams. To achieve some celll formatting with a script like macro in Excel for the web in the cloud flow, you may use Office Script.

    Introduction to Office Scripts in Excel - Microsoft Support

    May I know whether the macro is necessary in the file? What result do you want to get via the macro code? If it is necessary, you may try Office Script instead of macro to move forward.

    Run Office Scripts with Power Automate - Office Scripts | Microsoft Learn

    Thanks for your understanding and effort.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments
  2. Anonymous
    2023-12-14T23:11:13+00:00

    Thanks Cliff!

    The VB script is:

    When a user enters the phrase "In Progress" in to any cell in column J, then the users local computer time will automatically entered in to the next cell over in column K. In column L, the name of the user will automatically inputted.

    However, There's multiple users from different time zones and the time stamp for each user needs to be shown in Eastern standard time in the cell, so I had to make the code add hours to the time stamp depending on that users time zone.

    Example: I'm in PST so when i enter the Phrase "In Progress" in to any cell in column J, then my time stamp will automatically be added in to the adjacent cell in column K and the code will add 3 hours so the time will show as Eastern Standard time. It will also automatically enter my dynamic user name in to the adjacent cell in column L.

    Power Automate:

    Also, In Power Automate, when a user enters "In Progress" in to any cell in column J, then it will automatically copy the data from the cells in column G and Column I from the corresponding row and then paste those cells data in to a specific Teams chat.

    0 comments No comments
  3. Anonymous
    2023-12-16T06:24:41+00:00

    Dear RomeoV2024,

    Thanks for your updates and confirmation.

    May I confirm whether you just need to populate the time and user name based on the users' time zones via VBA in your environment?

    If yes, I think that it doesn't need to use VBA and it can be done by PowerApps or Power Automate automatically as the VBA code doesn't work with a cloud flow.

    May I know whether you can use PowerApps in your environment? It is better to create a PowerApps form and let the user update the cell status on the form and transfer the data to Excel via Power Automate.

    Welcome to share your updates at your convenience.

    Thanks for your effort and time.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments
  4. Anonymous
    2023-12-17T00:59:02+00:00

    Thanks Cliff.

    It's a little complicated but I'll explain the best I can.

    How the sheet is maintained:

    A new excel sheet is created every month. Then a new tab in that excel sheet is created every morning. A template is copied over from a master Excel sheet in to the tab every day. The team works out of the tab that was created for that day. Some of the team uses Excel online, some use the desktop version.

    There are about 3 people that create the Excel sheet and update it through out the day. There are around 7 team members(including myself) who are in the Excel sheet all day long updating it on the fly(entering "In Progress" with time and date). The Excel sheet stays open all day as the team needs to constantly look at it and make changes on the fly really quick.

    Manual processes I want to become automated:

    1. A user goes in to Excel and updates a cell to show "In Progress".
    2. Then the user will copy certain cell data from the Excel sheet and paste it in to a Teams Channel.
    3. Then the user manually enters the time in to the next cell and then will adjust the time to make it reflect Eastern time. All the Team members are in different time zones but we all go off of Eastern time.
    4. Then, the user needs to manually type the users name in to the next cell over.

    So you see, I'm trying to automate the process to just be all in one click. When a user selects " In Progress" from the drop down in the cell, I want the other processes to become automatic.

    Hope that makes sense.

    Thanks Cliff! :)

    0 comments No comments
  5. Anonymous
    2023-12-19T06:46:28+00:00

    Dear RomeoV2024,

    Thanks for your updates.

    I understand what you mean and I may modify the flow and do some tests to verify the result.

    I'll update here as soon as possible.

    Thanks for your effort and time.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments