Unable to open CSV : Internal Error: Exception has been thrown by the target of an invocation.

nluhadiya

New Member
Hi All,

I am not able to open a CSV via Blue Prism MS Excel object and getting following error during "Open Workbook" stage:

" Internal : Could not execute code stage because exception thrown by code stage: Exception has been thrown by the target of an invocation."

Can someone please help here ?
 

RDawson9

Geek
Staff member
Hi @nluhadiya

Could you post a screenshot of the inputs you're giving to that Action stage please? It should be asking you for handle and file name.

Rob
 

Ana J.

New Member
Hi!

I'm working on something similar and I'm getting the same error on the Open Workbook stage. Here's the screenshot of the inputs I've use.
 

Attachments

  • Open Workbook.PNG
    Open Workbook.PNG
    33.4 KB · Views: 471
Hi @nluhadiya and @Ana J. ,

To import a csv in a collection, you don't need to use the create instance or open workbook object. Instead, you need to use the "Utility File Management- Get CSV text as collection object."
I am attaching files for help.
 

Attachments

  • csv collection.PNG
    csv collection.PNG
    27.8 KB · Views: 346
  • get csv as collection.PNG
    get csv as collection.PNG
    33.2 KB · Views: 331
  • It works.PNG
    It works.PNG
    9.2 KB · Views: 297

VJR

Well-Known Member
Hi Mareenchen,

If a VBO is not seen in the Action stage dropdown then it can be imported from
C:\Program Files\Blue Prism Limited\Blue Prism Automate
There will be a separate folder for VBO.

You should be able to find the File Management VBO there but if any VBO that are not even found in this folder then it has to be downloaded from the BP portal.
 

tborek

New Member
Yes, it helps with CSV files, but i does not solve problems with other Excel formats, like xlsx for example. I searched solution to this problem for like a week now, and as I finally found it I will refresh this topic for future RPA developers generations. ;) In my case changing windows regional settings (you find them in control room -> Clock, Language, Region -> Region -> Format (Win10)) to English (USA) solved problem.

If you don't want to change your own regional settings, you need to hardcode en-US region in Blue Prism. To do so, go to MS Excel VBO, double click on it's properties on Initialise page. Next navigate to Global Code tab, and scroll to the very bottom. By the line 615 or so, you have variable culture defined in 3 different lines. It is referring to your local regional settings and you need to change it to en-US. I'm attaching a screen showing how.

Hope it helps you too.

Cheers,
Tom
 

Attachments

  • guide.jpg
    342 KB · Views: 583
Last edited:

sebeid

New Member
I've had the same problem for a few days, but I got it working now. I had to set everything to English/United States. So set the language in Excel to English (United States), and the go to the Time And Language settings on your Windows 10. I changed the region and language to English there. I also went to "Administrative language settings" and set the Language for non-Unicode programs to english, the location to United States and the format to English (United States). That solved it for me, hope it helps!
 

Laura Pilar

New Member
I've had the next error in Write Stage when I was trying to write in SAP field:

Internal : Failed To perform Step 1 In Write Stage XXXX on page YYYY - Exception has been thrown by the target of an invocation.

The problem was the data chars. SAP doesn't accept space in that field and BP returns this error, so it is possible that this error represent an external error, an error of the app that we are automizing :)

I hope it helps,

Laura.
 

heisy

New Member
tborek's solution still works in 2019, thank you. The issue started to appear with upgrade from 6.2 to 6.3
 

geraguirre89

New Member
Yes, it helps with CSV files, but i does not solve problems with other Excel formats, like xlsx for example. I searched solution to this problem for like a week now, and as I finally found it I will refresh this topic for future RPA developers generations. ;) In my case changing windows regional settings (you find them in control room -> Clock, Language, Region -> Region -> Format (Win10)) to English (USA) solved problem.

If you don't want to change your own regional settings, you need to hardcode en-US region in Blue Prism. To do so, go to MS Excel VBO, double click on it's properties on Initialise page. Next navigate to Global Code tab, and scroll to the very bottom. By the line 615 or so, you have variable culture defined in 3 different lines. It is referring to your local regional settings and you need to change it to en-US. I'm attaching a screen showing how.

Hope it helps you too.

Cheers,
Tom

Thank you so much Tom, I was having this issue for somedays and now it is solved, I didn't want to change my regional settings so I changed the code in the MS Excel VBO and finally worked!
 

Spoorthy

New Member
Hello Tom,
I tried changing in the global code in Excel VBO where i am getting the Compiler error at line 615: Class 'System.Globalization.CultureInfo' cannot be indexed because it has no default property.' Kindly let me know how to fix this
 

papaqui21

New Member
Yes, it helps with CSV files, but i does not solve problems with other Excel formats, like xlsx for example. I searched solution to this problem for like a week now, and as I finally found it I will refresh this topic for future RPA developers generations. ;) In my case changing windows regional settings (you find them in control room -> Clock, Language, Region -> Region -> Format (Win10)) to English (USA) solved problem.

If you don't want to change your own regional settings, you need to hardcode en-US region in Blue Prism. To do so, go to MS Excel VBO, double click on it's properties on Initialise page. Next navigate to Global Code tab, and scroll to the very bottom. By the line 615 or so, you have variable culture defined in 3 different lines. It is referring to your local regional settings and you need to change it to en-US. I'm attaching a screen showing how.

Hope it helps you too.

Cheers,
Tom
Solved the issue. THANKS!!
 

Omkar Patil

New Member
Hi All,

I am opening the excel file through OLEDB and i got this error.
In my case if i have 2 files in folder then i am ale to open the first file but after that i am trying to open second file then it gives an error.
Is anyone know any solution on this?
 

maybeccie

New Member
Where i can find bussiness object properties and ia md oign from last 4 hours

To do so, go to MS Excel VBO, double click on it's properties on Initialise page. Next navigate to Global Code tab, and scroll to the very botto

PLEASE ALWAYS GIVE FULL ANSWERS... HALF ANSWERS WASTE OTHER POOR STUDENTS TIME..

cAN YOU ATTACH CLEAR PICTURES....
 

maybeccie

New Member
Yes, it helps with CSV files, but i does not solve problems with other Excel formats, like xlsx for example. I searched solution to this problem for like a week now, and as I finally found it I will refresh this topic for future RPA developers generations. ;) In my case changing windows regional settings (you find them in control room -> Clock, Language, Region -> Region -> Format (Win10)) to English (USA) solved problem.

If you don't want to change your own regional settings, you need to hardcode en-US region in Blue Prism. To do so, go to MS Excel VBO, double click on it's properties on Initialise page. Next navigate to Global Code tab, and scroll to the very bottom. By the line 615 or so, you have variable culture defined in 3 different lines. It is referring to your local regional settings and you need to change it to en-US. I'm attaching a screen showing how.

Hope it helps you too.

Cheers,
Tom



I changed the settings but still the problem is same


View attachment 1589606843414.png
 
Top