Hide row in excel not working - pywin32

Viewed 1202

I am writing a small program in python with pywin32 that manipulates some data in excel and I want to hide a row in order to obscure a label on one of my pivot tables.

According to MSDN the proper syntax is

Worksheet.Rows ('Row#').EntireRow.Hidden = True

When I try this in my code nothing happens - no error, nor hidden row. I have tried every combination I can think of of ranges to try and feed it but it will not hide the row in the output files.

Anyone know of a solution to this or if it is not handled by pywin?

EDIT:

Upon further debugging, I am finding that when I immediately check, the row's Hidden value is True but when I reach the save point the row is no longer hidden (another print reveals Hidden = False)

2 Answers
Related