Install the package of 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 and the cell location to write to.
Once you leave the Excel Application, it automatically closes the file.