-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figuring out NestedTables #244
Comments
I am not sure I understand your question. Each Table has Cells/Rows and so on. Same with nested tables? |
Oh, i get it. You want to know which cell has nested table. Hrmms |
Yes, that's it |
I guess you would need add new property in Cell to include something. This is in the Table itself public bool HasNestedTables {
get {
foreach (var cell in this.Cells) {
var list = cell._tableCell.Descendants<Table>().ToList();
if (list.Count > 0) {
return true;
}
}
return false;
}
}
public List<WordTable> NestedTables {
get {
var listReturn = new List<WordTable>();
foreach (var cell in this.Cells) {
var list = cell._tableCell.Descendants<Table>().ToList();
foreach (var table in list) {
listReturn.Add(new WordTable(this._document, table));
}
}
return listReturn;
}
} So as part of specific Cell, just adjust the logic to it can be per Cell as well. |
Looks good, I will give it a go, thanks |
Solved by: #240 |
Hi
I'm trying to figure out how nested tables work. I have a Word document with a table containing two nested tables. I can see WordTable has a NestedTables property which contains the two tables but I can't find a way to get the parent cell for each nested table, am I missing something?
The text was updated successfully, but these errors were encountered: