I want to know how to assign data in a variable to excel file. I have already created an empty excel file and store the data in a variable. I have done webscraping and stored that data table into a variable. Now I want to assign the data table values into excel file.
How to assign a data in a variable in to excel file?
3.7k views Asked by Bhargav At
2
There are 2 answers
0
On
An alternative to what Lime suggested is to use
System -> File -> Workbook -> Append Range or Write Range (depending on you actual needs).
The activities under the Workbook "folder" won't open Excel, and as far as I know doesn't even need Excel to be installed.
The downside is that the file CAN'T be used by another process.
This is assuming you are using UiPath 8, as the online docs are a bit outdated / refer to v7.5.
If you don't already have it, you'll need to install the package for Excel activities. Manage Packages -> Available -> UiPath.Excel.Activities.
To write data to a cell, first use App Integration -> Excel -> Excel Application Scope, to open the Excel file. Inside that scope, use Write Value, and enter the variable you are writing, and the cell location to write to.
Once you leave the Excel Application Scope it automatically closes the file.