Add Column and Value in Datatable Excel

Hi All,

Currently i’m handling Excel file with big datarows, i need to add column and add specific formula based on the data.

Sample Add Column.zip (3.8 KB)

Sample Data : (999.999)
image

Based on workflow above, when i running robot to process 999.000 data it need time almot 3 minutes.
image

I crate this post just want to ask if any other solution to achieve running time robot faster?

Regards,

HI,

If my understanding is correct, you want to input “Even” or “Odd” in Formula column based No column, right?
If so, the following will work.

DtProcess = DtRead.Copy

Then

DtProcess.Columns("Formula").Expression = "IIF(CONVERT([No],System.Int32) % 2 =0, 'Even','Odd')"

Finally write this to worksheet.

image

Main.xaml (9.6 KB)

Regards,

1 Like

Hi @Yoichi -San,

Thankyou for your reply.
Already retry with solution informed above, but the running time process still high.
image

Regards,

Hi,

Can you check which part takes long time with turning on LogActivites option?

We can see start time and end time of each activity using “ShowTimestamp” button

image

Does the above Assign takes 2 min?

Regards,

1 Like

Hi @Yoichi - San,

Already check the timeline and found that read and write range activity that takes longer time.

Regards,

1 Like

Hi,

Your workbook seems very large. if it’s necessary to improve execution time more, reducing workbook size might be needed by some way such as separate worksheet, delete unnecessary data etc, if possible.

Regards,

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