Inserting data from one excel table to another

I have data from one excel table and want to insert it and add it to another table where there is already data
how it can be realized?

@teslyak9437

Read the data using read range …and then append to another excel using append range which add the data at the bottom or from where the data ends

Cheers

Hey @teslyak9437
very general:

  1. Use Excel Application Scope (first file)
  2. Read Range Activity: inside the Excel Application Scope, use the “read range” activity to read the data from the table.
  3. Use second Excel Application Scope (second file)
  4. Append Range Activity: inside this second Excel Application Scope, use the “append range” activity to add the data read from the first table to the bottom of the existing data in the destination table.

It would be:

  • Excel Application Scope
    – Use Excel File 1
    — Read Range
    – Use Excel File 2
    — Append Range

Use read range workbook activity

Then

Append range workbook activity

When using read range, you need to write the value to a variable. Can it be used later in Append Range?

Doing the free training is a good way to learn how to do these basic things.
There is one specific to Excel but of course you should do all of it.

@teslyak9437
Yes, when you use the “Read Range” activity to read data from an Excel file, the data is stored in a DataTable variable. This DataTable can then be used later in the workflow, including with an “Append Range” activity in a different Excel file.

Hi @teslyak9437

You can simply use append range workbook activity to append the data with existing data in excel.

Hope it helps!!


What do with this?

@teslyak9437
Ok. Sorry, I missed that you are using StudioX.
You can use write datable to Excel instead append range.
Remember to mark “append” option.
image

how to remove merged rows in Excel in StudioX?
this combined line is at the end of the table and is separated from it by an empty line

To insert data from one Excel table and append it to another table that already contains data using Studio X.

Read Data from Excel : Use the “Excel file Read range”
Read Existing Data : Similarly, use the “Excel file Read range”
Combine Data : Combine the data read from both tables. You can use activities such as “Assign” or “Add data row” to merge the data.
Write Data to Excel : Write the combined data to the destination Excel table using the “Excel file Write range” activity.

how to remove merged rows in Excel in StudioX?
this combined line is at the end of the table and is separated from it by an empty line

Hi @teslyak9437

In StudioX, you can remove merged rows in Excel by using the “Remove Rows” action combined with a filter to remove rows where cells are merged.

Identify the Merged Rows: Before you proceed, make sure you identify the range of merged rows in your Excel sheet.

Add an Empty Row Below the Table: If the merged rows are separated from the table by an empty row, make sure to add a step to insert a new row below the table. You can do this using the “Insert” action and choosing to insert a row below the table.

Remove Merged Rows:

  • Click on “Add Action” in StudioX.
  • Search for and select the “Remove Rows” action.
  • In the properties panel, set the range to cover the area where merged rows are.
  • Click on “Add a condition” to define a condition for removing rows.
  • Choose “Custom expression” and enter a formula to check if the cells in a row are merged. For example, you might use a formula like =ISBLANK(A1) if column A contains merged cells, assuming merged cells in Excel become blank after unmerging.

I don’t have “Remove Rows” action