Hi , I have a Excel with multiple sheets uploaded in sharepoint I need a flow which unhide the particular sheet from the other sheet.
Hi @spandana9 ,
Apparently we don't have a specific action to control the sheets visibility in Power Automate. However, if your organization rules allow, you can achieve this result by using an Office Script, which in summary is a Typescript code that performs a similar task to VBA (but in Excel Web and integrated with Power Automate).
If this approach works for you, you can use this code to unhide a sheet (just change 'Sheet2' for the name of the sheet that you want to unhide):
function main(workbook: ExcelScript.Workbook) {
workbook.getWorksheet('Sheet2').setVisibility(ExcelScript.SheetVisibility.visible)
}
Also, I'm bringing some references about the Office Scripts and how to implement it with Power Automate:
- Official docs: https://learn.microsoft.com/en-us/office/dev/scripts/overview/excel
- Power Automate action: https://learn.microsoft.com/en-us/office/dev/scripts/develop/power-automate-integration
- VBA vs Office Scripts: http://digitalmill.net/2023/06/10/office-scripts-the-new-vba/
- Getting started with Office Scripts: http://digitalmill.net/2023/06/19/get-started-with-office-scripts/
- Returning data from Excel ranges with Office Scripts: http://digitalmill.net/2023/09/01/accessing-excel-ranges-with-power-automate/
If you think that this approach makes sense for you, please share a little more context about how do you want to trigger this automation, so we cand build a flow design for you.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional