How to install OpenRPA.Office?

Hi All,

Greetings!

How to install OpenRPA.Office? My purpose is to read data from two separate sheets from the same xlsx file. Or should I simply use DataSet.Tables(0) and DataSet.Tables(1) ?

Massive thanks,
Dante

You install that package during OpenRPA install, it’s one of the built-in components.

When you read out the whole excel file, yes, the sheet tables will be available there. Do note that the table names will be equal to the sheet names, and that it is not guaranteed that the order you see them in Excel will correspond to the table indexes, so best to check.
Can’t confirm right now, but I think you should be able to refer to the tables by name as well, so that makes it easier.

1 Like

If you have a supported version of microsoft office installed while running openrpa.msi it will allow you to install the office activities that allows a more complex interaction with office.
If you do not have office 2010 or better installed, you can also use read excel/write excel under utilities.

Hi AndrewK,

Greetings!

Hhhmm, not part of my installation for OpenRPA.Office. Should it be part of the “Core Components”?

image

Yes, sheet name is possible to identify the sheet, DataSet.Table(“Sheet Name”) when using ReadExcel activity. However, there is no property in WriteExcel for Sheet Name.

Massive thanks,
Dante

It should be a separate option, but see also Allan’s post above (you need to have Office installed):
image

When you WriteExcel from a DataSet, it writes all tables as sheets. Its main use is for bulk read/writes (especially writes → it’s great to just “dump” a bunch of data into an excel in one go).
If you want to go one by one/have more granular control, use the activities that take DataTables in (WriteRange etc.).

Hi Allan and AndrewK,

No installed MS Office, as installations of such is restricted in the Windows Server as per company policies.

I was trying the following:


… producing error: # Object reference not set to an instance of an object.
… or am I missing something?

Massive thanks,
Dante

No worries, needs to first initiate the DataSet variable :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.