PrimePrism
Member
Hi,
I need to use Blue Prism to do some manipulations in an Excel file like copying, filtering and writing the data, using the formulas, etc. which I hadn't tried before. As a first step to start with I used the code stage with the following code.
=====================================================
Dim sw, dw As Object
Dim ss, ds As Object
Dim excel, sheet As Object
dim Age as integer
Try
sw = excel.GetWorkbook(Handle, "C:\Worksheet in Basis.xlsx")
ss = excel.GetWorksheet(Handle, "C:\Worksheet in Basis.xlsx", "Sheet 1")
sw.Activate()
ss.Activate()
excel = ss.Application
sheet = excel.ActiveSheet
Age = 18
sheet.Range("T2:T600")=Age
Success = True
Catch e As Exception
Success = False
Message = e.Message
Finally
sw = Nothing
ss = Nothing
dw = Nothing
ds = Nothing
excel = Nothing
sheet = Nothing
============================================
I'm expecting Blue Prism to write the Age from cell T2 to T600. But, the BP object that I've created creates the Excel instance and opens the workbook, but does not write the age in the column T. Any help is much appriciated. Thanks in advance.
End Try
I need to use Blue Prism to do some manipulations in an Excel file like copying, filtering and writing the data, using the formulas, etc. which I hadn't tried before. As a first step to start with I used the code stage with the following code.
=====================================================
Dim sw, dw As Object
Dim ss, ds As Object
Dim excel, sheet As Object
dim Age as integer
Try
sw = excel.GetWorkbook(Handle, "C:\Worksheet in Basis.xlsx")
ss = excel.GetWorksheet(Handle, "C:\Worksheet in Basis.xlsx", "Sheet 1")
sw.Activate()
ss.Activate()
excel = ss.Application
sheet = excel.ActiveSheet
Age = 18
sheet.Range("T2:T600")=Age
Success = True
Catch e As Exception
Success = False
Message = e.Message
Finally
sw = Nothing
ss = Nothing
dw = Nothing
ds = Nothing
excel = Nothing
sheet = Nothing
============================================
I'm expecting Blue Prism to write the Age from cell T2 to T600. But, the BP object that I've created creates the Excel instance and opens the workbook, but does not write the age in the column T. Any help is much appriciated. Thanks in advance.
End Try