cancel
Showing results for 
Search instead for 
Did you mean: 

"Get Table As Collection" Not retrieving data From tables

thawatchaitaen1
Level 2
  1. How to retrieve data in tables in AIMC Monthly Performance_Production_31January2022.doc file?
  2. Try to test using the "Get Table As Collection" Action, it can't be done. due to an error as shown in the picture
            a. Error
12963.png
b. Action "Get Table As Collection"


------------------------------
thawatchai taengthong
------------------------------
2 REPLIES 2

Denis__Dennehy
Level 15
Looks like a complex table structure which will not go neatly into a datatable structure without some additional coding logic.  I.e. it has merged cells,  probably nested tables, etc.   The Blue Prism collection is a simple datatable with simple columns and rows.
I probably need to look at other ways of extracting the table from Word (as text or xml etc) and parsing it.   Another option is to go upstream in the process to the source of the table in this word document and see if you can access the original source rather than integrating with a format aimed at visual display to humans.

------------------------------
Denis Dennehy
Head of Professional Services, EMEA
Blue Prism Ltd
Europe/London
------------------------------

PvD_SE
Level 12
Hi T,

Dunno if this issue already has been resolved, but in cases like this it can be a good idea to start with a simple action, such as 'Get Table Cell Value' to see if you can actually read from the table in the document. This allows you to get the Table Number, the X and Y values correctly set up.

IMHO, Word documents can be tricky to read data from. Tables can be hidden (have invisible borders) and therefor do not show in the document but yet still exist and do count for the parameter 'Table Number'. Tables can also be in unusual places such as in the header of the document, again with the same issues as mentioned before. Unhide (set table borders to a visible color) and try again. 

Depending on the source of your Word document, it may be built up exactly like earlier documents of that type or they may have been worked manually. In the last case, 

Notes:
  • In our installation of BP, version 6.5.1, we do not have action 'Get Table As Collection'. Perhaps it has been added in a newer version or you have added it there yourself?
  • Many visitors of this site, including me, cannot open documents from the Interweb for security reasons. That includes your document link. Please attach a screenshot of the section that is giving you a hard time. Make sure not to include personal or company data on your screenshots as this is not in compliance with the EU GDPR legislation.


------------------------------
Happy coding!
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)