Solved How to handle csv file

junjie

Member
hi bro
this object is a commonly shared object, and always and all the times got people who are editing it. I cannot contact the person who is using it.
I can only view it :(:(
what can we do with it ?

can we create a new object? and which are the critical and important pages that i need to copy from it to create my own VBO object so that the object i create can work (as a normal VBO excel object) ?
 

junjie

Member
hi bro
please help ...i'm so stressed now because i do not know how to resolve this : (
i have this working file, and now i want to open the files as mentioned in the columns E

View attachment 1534564784443.png

how to open this 2 files?
and in case i have more files (in this columns), how to let blueprism know and to continue open all if there is ?
 

absak

Member
Hello, Have anyone idea about how to access filed imported into a collection from a CSV file (i see no colimn in the collection)
 

absak

Member
Hello Gays,

I had tried to read CSV and access to Collection Fields.

using many methods (see attached).
 

Attachments

  • BPA Object - GetExtractionFiles-xml.zip
    6.3 KB · Views: 36

hixavolev

New Member
Hi Rajan,

in your situation you have to change the value of semicolumn delimiter in Import CSV code stage.

1. Goto Excel VBO Object
2. Goto Import CSV page
3. Open Code stage and goto code tab
4. there you will find "Textfilecommadelimiter = True <--- change this to false
5. there you will find "Textfilesemicolumndemiliter = False <-- change this to true
6. save it and refresh the process and run it

that's it


This works amazing
 

omar2090

New Member
Hi junjie,

for this you have to write a VB code in Code stage.

1. create a new page in Excel VBO object
2. add code stage
3. create 2 input parameter (Excel file full path with .xlsx or xls, CSV file full path with .csv)
4. in code paste below code
Code:
Dim ExcelApp As New Application
Dim ExcelWkb As Workbook

Try

ExcelApp.DisplayAlerts = False
ExcelWkb = ExcelApp.Workbooks.Open("filepath\filename.xlsx")
ExcelWkb.SaveAs(FileName:="Csvfilepath\CsvFileName.csv",FileFormat:=Microsoft.Office.Interop.Excel.XlFileFormat.xlCSV)
ExcelWkb.Close()
ExcelApp.DisplayAlerts = True
ExcelApp.Quit()

Catch ex as Exception
      Throw ex

End Try

What external references and namespace do you use?
 

nagababu

New Member
Hi junjie,

for this you have to write a VB code in Code stage.

1. create a new page in Excel VBO object
2. add code stage
3. create 2 input parameter (Excel file full path with .xlsx or xls, CSV file full path with .csv)
4. in code paste below code
Code:
Dim ExcelApp As New Application
Dim ExcelWkb As Workbook

Try

ExcelApp.DisplayAlerts = False
ExcelWkb = ExcelApp.Workbooks.Open("filepath\filename.xlsx")
ExcelWkb.SaveAs(FileName:="Csvfilepath\CsvFileName.csv",FileFormat:=Microsoft.Office.Interop.Excel.XlFileFormat.xlCSV)
ExcelWkb.Close()
ExcelApp.DisplayAlerts = True
ExcelApp.Quit()

Catch ex as Exception
      Throw ex

End Try
throwing errors as application is not a member of micrsoft
 
Hi Rajan,

in your situation you have to change the value of semicolumn delimiter in Import CSV code stage.

1. Goto Excel VBO Object
2. Goto Import CSV page
3. Open Code stage and goto code tab
4. there you will find "Textfilecommadelimiter = True <--- change this to false
5. there you will find "Textfilesemicolumndemiliter = False <-- change this to true
6. save it and refresh the process and run it

that's it


Hi,

I did this but i get this error : The given key was not present in the dictionary

Can you help me out with this ?
 

Attachments

  • import csv 2.PNG
    266.8 KB · Views: 24
  • import csv 3.PNG
    393.2 KB · Views: 20
  • import csv.PNG
    286.2 KB · Views: 20

Arjun__

New Member
Dynamic changing the elements, for example if I spy an element it gets highlighted but if the page changes and not the element, it will not gets hilighted. Could you please help through it?
 

NikNik93

New Member
Hello, i importet the Zip Process and made a copy of the EXCEL VBO and changed
"Textfilecommadelimiter" = True <--- change this to false
"Textfilesemicolumndemiliter" = False <-- change this to true

But now i just get the Message "Exception : Failed to import CSV: The given key was not present in the dictionary."
Even if i edit the Basic Excel VBO this way, what i really dont want to do, it just doesnt work.

The Basic VBO just dont change the CSV in a "normal" EXCEL format.

Can anybody please help me?..
 

Attachments

  • 2022-10-20_11h06_13.png
    2022-10-20_11h06_13.png
    148.1 KB · Views: 0
Last edited:
Top