Read downloaded excel file

When I would like to read an excel file which just downloaded using bot (within same rpa file), it shows “Archive file cannot be size 0.”

To check the problem with the excel file, I open the excel file, I found out that I have to click on the button shown below in order to edit.

After i clicked on the button and save the file, I run the activity to read range, it works now.

Any ways that I can fix the problem? To let the bot to deal with the protected view issue? Where I can directly download the excel file, then read and export data out.

Thank you.

This error happened when the size of your Excel file is 0. When you create a Excel document, the document is empty, and at this time, if you open it with Open XML sdk, you will get this error.

Try to solve it by inserting a delay between download and reading activity

Read this for better understanding.

https://social.msdn.microsoft.com/Forums/lync/en-US/1a5c2469-9396-4c6f-852b-caaed5d5f73f/archive-file-cannot-be-size-0?forum=oxmlsdk#:~:text=This%20error%20happened%20when%20the,it%20is%20not%20empty%20file.

Thank you very much! Once I added the delay time, it works properly now.

Hi @hitoriya,

Glad it solved your problem,
Can you mark my answer as solution as it might help someone who faced same issue and searching for solution.