Increase Excel Write Cell Speed

Hello, I am trying to speed up a process and hope you can share a best practice to try.

I have an excel file with an 4 columns (Address, City, State, Zip).

Using a Do/While loop, I read an entire address and store in column “Address” for a given row.

I read CurrentRow.ByField(“Address”) into a string variable. I then split the string using Regex into an array. I then write each element of the array to the appropriate cell in each row,

It iterates ever so slowly through each row and I am trying to find a way to incease the speed of this.

Is there another method or approach I should try to make this more efficient?

Thanks.

Brett

Hello Brett,

We can use LINQ query to complete the above task in one activity without having multiple iterations.

We are not using traditional For each loop also.
By using LINQ Query we will also save time.

Please refer attached code for reference.
Let us know it ur query is sloved.

SplitData In Datatable.zip (3.2 KB)

@Brett_Johnson
make sure you are using the excel-write/read range instead of workbook read/write range, and that your do while loop in an excel application scope

Hi @Brett_Johnson ,

Why do you use a While Loop, It should be possible even with a For Each Row Activity, which should make the processing of the rows faster.