in reply to Win32::OLE reading word file with tables

You can query the number of columns on a particular row. This would be more general and allow for say 2 or 3 columns to be merged together. Also, I think this foreach type of loop will be faster than your while because the fancy object method $table->Rows->Count is only evaluated once and not on every loop iteration.

# Iterate through rows and count columns foreach my $row_index (1 .. $table->Rows->Count) { my $row = $table->Rows->Item($row_index); my $column_count = $row->Cells->Count; print "Row $row_index has $column_count columns.\n"; }
posting quickly because the website is unstable and I am getting timeouts when loading pages