I am new in uipath world and I want to create a robot which should do the following simple tasks:
I have 2 .xlsx files: source.xlsx and destination.xlsx
destination.xlsx contains 8 columns
source.xlsx contains 4 columns
I need to copy data from source at the end of the destination file in columns BCDE.
For column A I have a formula and for column FG other 2 formulas.
Here is how I did it:
I used an ReadRange to read the entire source.xlsx(dtSource).
1.1 I got the number of rows from source;(intSourceCounter)
I used an Application Excel Scope
2.1 I used an ReadRange to read the entire destination.xlsx(dtDestination);
2.2 I got the number of rows from destination(intDestinationCounter);
2.3 I calculated the range where to write B(intDestination):E(intDestination + intDestinationCounter)
2.4 BuildDatatable with 4 columns (dtFourCloumnsDt)
2.5 Filter Datatable (input: dtSource; output: dtFourCloumnsDt)
2.4 Write range dtFourCloumnsDt into dtDestination
2.5 BuildDatable with one column to for A(dtColumnA);
2.6 foreach row in dtSource
2.6.1 strColumnAFormula = “myFormula”;
2.6.2 AddDataRow (strColumnAFormula)
2.7 Write range dtColumnA into dtDestination
2.8 BuildDatable with one column to for F and G(dtColumnsFG);
2.9 foreach row in dtSource
2.9.1 strColumnFFormula = “myFormulaF”;
2.9.2 strColumnGFormula = “myFormulaG”;
2.9.3 AddDataRow (strColumnFFormulaF,strColumnGFormulaG)
2.10 Write range dtColumnsFG into dtDestination
My destination.xlsx has only 10 rows.
My source.xlsx has 1000 rows.
time required for execution is 2 hours which is in my opinion huge.
How can I do it to work much faster. Where am I wrong?
This were test files, the productive ones will have more than 200.000 rows