VB Script In Automation Anywhere

rpalabs

New Member
Hi Team,

I would like to know how to run the VB Script file in Automation Anywhere.

And I would like to know the VB scripts for the below examples:

1. Creation of excel file and entering the data into that newly created excel file
2. After creation of excel, VB Script to move from that folder to another folder
3. Copying the data from one excel file to another excel file and rename the file after copying the data
4. How to add the columns names in Excel Files
5. How to remove the rows from excel based on particular/predefined condition
6. How to remove the rows from excel based on input condition (Wanted to remove the rows if salary is equal to 10000 or 20000 or 30000 based on the manual input which we have provided manually)
 

VJR

Well-Known Member
Hi rpalabs,

It has been quite some time since you posted your question. Not sure if you found any solution to those.
You can check out the below

How to Run VB Script from Automation Anywhere:

1. VBScript to create, open, and edit excel files
https://gist.github.com/simply-coded/758e2557ccd1a55b46765d8bb1099ec6

2. After creation of excel, VB Script to move from that folder to another folder

Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")

'To Move a file
fso.MoveFile "LOCATION", "NEW LOCATION"

3. Copying the data from one excel file to another excel file and rename the file after copying the data
https://gist.github.com/simply-coded/758e2557ccd1a55b46765d8bb1099ec6

Also you rename a file using FSO by moving it
Dim Fso
Set Fso = WScript.CreateObject("Scripting.FileSystemObject")
Fso.MoveFile "A.txt", "B.txt"


4. How to add the columns names in Excel Files
Didn't quite get if you meant column headers or insert columns in Excel

Check out the script in the below link
https://blogs.technet.microsoft.com...how-can-i-insert-a-column-into-a-spreadsheet/


5, 6. Delete a row based on any condition

In the below link add your condition (if salary is equal to 10000) in place of "If objExcel.Cells(i, 1).Value = "delete" Then"
https://blogs.technet.microsoft.com...elete-specified-rows-in-an-excel-spreadsheet/
 

g444ran

New Member
how to pass variables as output parameters to automation anywhere from vbscript. I need a sample script for example.
Thanks in advance.
 
Top