Search code examples
excelblueprismrpa

How do I split excel column data into TWO columns with Blue Prism


I have an Excel spreadsheet that has various columns with their respective data. I need to take column "A", and split the example text "[11111] Dog" into TWO columns: "A" that now has "[11111]", and "B" that now has "Dog". Is there a way to do this within Blue Prism?

I have already used an action to gather the data into a collection, but am unsure of the next steps to execute what is desired.


Solution

  • How would you write the TextToColumn function in BP. I am trying as well, but is not working. This is how I am doing it.

    Dim wb, ws, range, excel as Object
    
    wb = GetInstance(handle)
    ws = GetWorkbook(handle, WorkbookName).ActiveSheet.Range(cellref,cellref).Activate()
    excel= ws.Application
    
    range = ws().Selection.TextToColumns(OtherChar, Other)