Workbook Read Range vs. Excel Application Scope Read Range

WithAndWithoutExcelScope.zip (16.9 KB)

Hi,

I think there is a bug in the Excel Application Scope, which causes that it reads workbook differently to a Workbook Read Range activity.
If you look into the attached zip file, you will find that the Workbook Read Range is disabled.
In such a scenario, the robot will return 0 as a result of readDT.select(“Column3=‘’”).count operation.
If Excel Application Scope is disabled and Workbook Read Range is enabled, the robot will return 1, which is the correct number of empty cells in the read data range of Column3.

Could anybody tell me if there’s anything I am missing here? Why do these 2 version of Read Range return different results?

Thanks,
Jacek

2 Likes

Hi @jacek.jusyn

Nice spot! We’ll look into it :slight_smile:

Can you please let me know if this fixed ?

1 Like

Hello,

Is this fixed? I have the same problem vice versa, Excel application scope provides the correct result.

I am trying to read an Excel and insert it as new sheet in another Excel. If I do this via Workbook, the robot cannot read some fields correctly, for example a date field comes: “30/00/2020:@”. If I run this using Excel Application scope, the date comes correctly “30.12.2020”. However, using the Excel application scope makes my robot run 2200% slower.

Best regards,

Mika

Hi @MikaTapio

What is your version of Studio and the Excel activity package?

Also, would you be able to share a sample, dummy Excel file that causes this issue? It would be fantastic if you could share a zip of an entire new, fresh project that reproduces the issue on a dummy file.

Hello @loginerror,

Thanks for the quick reply. Here is an example of the Excel I’m trying to read, I have deleted all private info fields.

f009767.xlsx (15.6 KB)

My studio version is Studio 2020.10.2. My UiPath.Excel.Activities version is v2.9.3.

Here’s a screenshot of the 2 different outputs, as you can see, other data was compromised too, some fields are missing. I was able to overcome this by selecting more specific range “A1:I64”.

However, the date field could not be written correctly with Workbook for some reason.

Here’s a screenshot of the Robot with Workbook Read Range.

When I ran the robot with Excel Application scope instead, I only used Excel Appl. Scope to Read Range. To write range, I continued to use the Workbook Write Range in both outputs.

Best regards,

Mika

I think it might be related to this comment:

We are already tracking both this and the linked above topic in our internal bug tracker, but i cannot offer any timeline as to the fix.

Having said that, I tested it for myself with your Excel file and for me the workbook Read Range activity reads it correctly, because this is my output:
image

The Excel package is 2.9.3 as well, which makes it super strange.

Hello,

Thanks for the info. I believe also it is related to the same issue mentioned in the other post. I can’t understand why this works when you tried it. I’ve tried to tick on and off the “PreserveFormat” in the Properties, and having it off actually copies the date correctly. However, then the robot cannot read the full proforma invoice nr. Instead of f009767, it comes as 9767. Quite frustrating when you tick something, something else works and another thing breaks.

Perhaps the issue is originating from the fact that the Excel I’m reading is created by another macro, which I have no understanding of. I will try to find a solution for this, thanks for your time Maciej.

Best regards,

Mika