Copy link to clipboard
Copied
My Code get Table, But it not working.
It only can get a Cell has content="FrameMaker Source Item"
This content not exist in my table.
tableId = F_ApiGetId(0, DocId, FP_FirstTblInDoc);
while ( tableId ) {
firstrowId = F_ApiGetId(DocId, tableId, FP_FirstRowInTbl);
while ( firstrowId ) {
cellId = F_ApiGetId(DocId, firstrowId, FP_FirstCellInRow);
while ( cellId ) {
cellId = F_ApiGetId(DocId, firstrowId, FP_NextCellInRow);
}
firstrowId = F_ApiGetId(DocId, tableId, FP_NextRowInTbl);
}
tableId = F_ApiGetId(FV_SessionId, DocId, FP_NextTblInDoc);
}
}
How get TableId in Document by FDK?
diatranthanhoa,
I don't understand your question. But if you are trying to iterate over all cells in every table, you have errors in your code. They are common mistakes. The errors are:
- FP_NextTblInDoc is a property of a table object, not the document
- FP_NextRowInTbl is a property of a row object, not the table
- FP_NextCellInRow is a property of a cell object, not the row
So, I would adjust your code as follows, noting that I did not test this:
tableId = F_ApiGetId(0, DocId, FP_FirstTblInDoc);
whi
...Copy link to clipboard
Copied
diatranthanhoa,
I don't understand your question. But if you are trying to iterate over all cells in every table, you have errors in your code. They are common mistakes. The errors are:
- FP_NextTblInDoc is a property of a table object, not the document
- FP_NextRowInTbl is a property of a row object, not the table
- FP_NextCellInRow is a property of a cell object, not the row
So, I would adjust your code as follows, noting that I did not test this:
tableId = F_ApiGetId(0, DocId, FP_FirstTblInDoc);
while ( tableId ) {
firstrowId = F_ApiGetId(DocId, tableId, FP_FirstRowInTbl);
while ( firstrowId ) {
cellId = F_ApiGetId(DocId, firstrowId, FP_FirstCellInRow);
while ( cellId ) {
cellId = F_ApiGetId(DocId, cellId, FP_NextCellInRow);
}
firstrowId = F_ApiGetId(DocId, firstrowId, FP_NextRowInTbl);
}
tableId = F_ApiGetId(DocId, tableId, FP_NextTblInDoc);
}
}
Hope this helps,
Russ
Copy link to clipboard
Copied
Hi! I use the same code but I want to skip tables from non Body Pages. How can I do that?
Copy link to clipboard
Copied
Hi Ch, please avoid reviving these old threads for loosely-related followup questions. I realize you are just looking for help, but it makes it difficult to keep things organized for readers and contributors alike. Please refer to your current post for this issue:
How to filter tables from body pages only?
Russ
Copy link to clipboard
Copied
OK Russ.