# How to programatically remove an option for all cells?

I'm trying to remove the CellGroupingRules options in every cell in a notebook.

Eventually I opened the Notebook in a text editor and did a find replace, but there has to be a better solution.

And this doesn't work:

Scan[(#=DeleteCases[#, CellGroupingRules, \[Infinity]])&,Cells[]]


Scan[
SetOptions[#, CellGroupingRules -> None] &,
Cells[]
]

• I tried -> Automatic, but I never tried None, will this break the stylesheet? – M.R. Aug 29 '15 at 21:22
• @M.R. I don't know, what do you mean? It should be ok, stylesheet settings are going to be overwritten by this explicit statement so it should be ok. Abount None, yes, it was a blind shot :P – Kuba Aug 31 '15 at 7:49