web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Check if cell is hidde...
Power Automate
Suggested Answer

Check if cell is hidden in Excel

(2) ShareShare
ReportReport
Posted on by 15
Hello,
 
 
I need to perform a check on an Excel workbook which is to validate is certain cell is hidden or not. I have tried some workarounds with built-in Excel actions but I could not achieve this.
 
Currently I am using UI actions as a workaround but I would want to avoid using them. So, is there another way to check if a cell is hidden?
 
 
Thanks!
I have the same question (0)
  • JuanPuello Profile Picture
    5 on at
    My current workaround is this one:
    - Map the selector of the cell and use variables in the selector to check for any cell dynamically
    - Use the if windows contains action to validate if the selector is found
    - Before using the if windows contains action I had to make sure that the column/row that I am checking are visible on the screen, to do that I used the "Activate cell" action (If I don't do this and the sheet is scroll to the right for example and the cell is not visible on the screen, then the selector could not be found although the cell was not hidden)
  • Suggested answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at
    I recommend using VBScript to do this. 
     
    The following sample script will check if row 3 in sheet "Sheet1" is hidden in a document located at a path that is stored in a %ExcelDocument% variable:
     
    Dim objExcel, objWorkbook, objSheet, isRowHidden
    
    ' Create an instance of Excel
    Set objExcel = CreateObject("Excel.Application")
    
    ' Open the specified workbook
    Set objWorkbook = objExcel.Workbooks.Open("%ExcelDocument%")
    
    ' Access the specified sheet
    Set objSheet = objWorkbook.Sheets("Sheet1")
    
    ' Check if row 3 is hidden
    isRowHidden = objSheet.Rows(3).Hidden
    
    ' Output the result
    WScript.Echo isRowHidden
    
    ' Close the workbook without saving
    objWorkbook.Close False
    
    ' Quit Excel
    objExcel.Quit
    
    ' Clean up
    Set objSheet = Nothing
    Set objWorkbook = Nothing
    Set objExcel = Nothing
     
    You can also do the same with a column by changing "objSheet.Rows(3).Hidden" to "objSheet.Columns("C").Hidden" (which will check if column C is hidden).
     
    Use the script in a Run VBScript​​​​​​​ action.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard