Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have successfully combined multiple tables into an inner joined straight table. I know how to loop through the rows of a single table. Is it possible to loop through the rows of a straight table using script?
Jerry
For i = 1 to noofRows(table)
let myvalue = peek('field', $(i))
next
A straight table (chart) object is not a regular table. I have tried using the object name as the table name and using the caption, but neither version will return the number of rows.
No, you cannot access a sheet object from script. You will need to create a qv table in the script that mimics the contents of the straight table object.
-Rob
Yes you can loop through the records from script:
sub ReadTable
set table = ActiveDocument.GetSheetObject( "CH218" ) ' Use Object ID
for RowIter = 1 to table.GetRowCount-1
for ColIter = 0 to table.GetColumnCount-1
set cell = table.GetCell(RowIter,ColIter)
msgbox(cell.Text)
next
next
end sub
Above works perfectly for me.
Its even possible to insert, and update records too.
Regards
Corrie