Copy data from one excel file to another excel File alternative approach

Hi All , I need to copy the Data from one excel to another Excel but the source excel is having a lot of data into so it is taking a lot of time to read the excel and give the output as Datatable.
So is there any alternative way to copy the data one excel file to another excel file.

1 Like

Hi Vishal

Try copy/Paste range activity in classic or modern it will work

Hi @vishal_nachankar ,

We can use VBA code to copy data from one excel to other, I have attached a sample workflow below,
Uipath_CopyToWorkbook_Using_VBA.zip (18.6 KB)

Check with your input file by replacing sample one and check the process time.

Parameters:-
{“Your Source Sheet Name”,“Your Source Range To Copy”,“Your Destination Full Path”,“Your Destination Sheet Name”,“Your Destination Range To Copy”}

Hope this might help you :slight_smile:

8 Likes

Yes, there are alternative ways to copy data from one Excel file to another without reading the entire source file into a DataTable. Here are a few options:

  1. Use Excel Application Scope: Instead of using the Read Range activity to read the entire source Excel file into a DataTable, you can use the Excel Application Scope activity to open the source file in Microsoft Excel. Then, you can use Excel activities like Select Range, Copy Range, and Paste Range to copy the data from the source file to the destination file. This approach can be faster than reading the entire file into a DataTable, especially if you only need to copy a subset of the data.
  2. Use a macro: Another option is to write a macro in the source Excel file that copies the data to the clipboard or writes it directly to the destination Excel file. You can then use the Invoke VBA activity in UiPath to run the macro. This approach can be faster than reading the data into a DataTable, especially if the macro is optimized for performance.
  3. Use a database: If the source Excel file is very large and you only need to copy a subset of the data, it may be faster to import the data into a database like SQL Server or Access, and then use SQL queries to extract the data you need and write it to the destination Excel file. This approach can be much faster than reading the entire Excel file into memory, especially if the Excel file is very large.
  4. Use a package like Excel Connector: There are also UiPath packages like Excel Connector that provide more advanced Excel integration capabilities, such as the ability to write data directly to a worksheet without reading it into memory first. These packages can be faster and more efficient than using the built-in Excel activities in UiPath.

Hey @Manish540, thanks for sharing, helped me!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.