Excel Cannot open the file

Hello. Can someone please tell me what I’m doing wrong? I wrote instructions for the StudioX to create a file if it didn’t exist. However, it doesn’t seem to recognize the Excel file it created. Also, when I go to the file folder and open it from there, I can’t seem to open it. Please refer to the error message below. Thank you!


image

Hello , but can the studio open other excel files in your computer …

If the studio still opens other excel files in your computer then I can suggest a simple work around for what you want to achieve

Hi @David_Oku. StudioX is able to open other Excel files, but just not the one it created (with the “IF” command to create the file if it’s not there). The purpose of this exercise was for the robot to create the file and then use it subsequently in the code. Thanks.

Hello, sorry i took sometime i was modifying a sample workflow that should work for you. this workflow should be a great work around . i am assuming the new file the both creates gets corrupted so in this case the bot doesn’tcreate a new file it just copies a template and it should have no issues GenerateQuotes.zip (20.1 KB)

Thank you @David_Oku. I think the files you gave me is just for Studio as I wasn’t able to open them in StudioX.

Hello , Okay . But have you figured out the problem now . Have you been able to fix it . the activity I used there was a simple ‘‘Copy File’’ activity . all I did was to manual create an excel and save it a particular location within the bots main directory as a template . Then when I run the process it goes ahead to create the excel simply by making a copy of the template

The CreateFile activity doesn’t create an Excel file, but a generic file (Text file if you want). This is why Excel doesn’t recognize it.

If you wish to create an Excel file, you simple make sure that the CreateNewFile property is set to true on the “Use Excel file” activity and it will create one if it doesn’t already exist:

2 Likes

Hello @David_Oku. Because I’m using Studio X, I wasn’t able to see open your files to see what was in there. Thank you for your time and I now understand the concept from your message which makes sense. I also received a reply for the solution from UiPath below which should work as well. :slight_smile:

1 Like

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