How to read a table in Word file, then write the table to excel file

Dear all,
i have some word files contain tables them, I wanna to read the table in word file ,then write the table to excel file. how could i achieve this function? Anybody who could give me a guide to deal with problem?
or some .xaml demo code ?

thanks a lot in advanced .

Best Regards

Try this:

thanks a lot for your reply.
in fact , content of word file would be changed always, how could deal with this problem?

I would use a do while and have the condition be that new information is different to the infomation gained in the last step. As the ctrl + g shortcut advances until it reaches the last table and stays theres, then you know you’ve copied all the tables when the new info on the clipboard ios the same as the last one.

thanks a lot for your reply , could you give me a .xaml demo?

thanks a lot in advanced.

I don’t have time unfortunately but this is agood opportunity for you to shapren your skills. This will get you comfotable with some control structures if you can do this yourself

1 Like

thanks a lot for you guide. i will try it .

Hi @Chris-Yiwei

Check this link.

Regards
Balamurugan.S

Hi @Chris-Yiwei,

I created a small activity in C#, Visual Studio to extract the datatable from a word document using “DocumentFormat.OpenXml” library.

The input required is the filepath of the document file, and a non-required input TableIndex that specifies which table to read from in the document (if there is multiple table exists), but by default this one is set to index 0 so if no value given it will return the value from the first table it finds.

Now since this activity returns datatype Data.Datatable, you can use the UiPath Excel activity to write the datatable into the excel file after executing this activity.

I hope this can be part of the solution your looking for :slight_smile:

otico.GetDTFromWordDocument.Activities.0.1.0.nupkg (1.2 MB)

Hi Otico,

This particular package “otico.GetDTFromWordDocument.Activities.0.1.0.nupkg” is not supported in Windows OS. Can you please provide me the one which does.

PFA.

Thank you!

Regards,
Mrinmayee