I'm working on Open XML document format for excel sheets.
var nodeList = WorksheetXml.SelectNodes(@"//c[child::f]");
it should return all rows with formulas, but it doesn't return anything. The same xml on Oxygen Editor, when applied the same xpath expression, returns all of them.
I am copying WorksheetXml inner xml to assure the content is the same... do you know why C# is not working the expected way?
EDIT: Namespace issue
I've put this:
var manager = new XmlNamespaceManager(WorksheetXml.NameTable);
manager.AddNamespace(string.Empty, @"http://schemas.openxmlformats.org/spreadsheetml/2006/main");
manager.AddNamespace("r", @"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
var nodeList = WorksheetXml.SelectNodes(@"//c[child::f]", manager);
and it didn't work, I think it is not a namespace problem.