Read excel cells and write the content in another application

Hello,

I have an excel file and column with a list of numbers. This list is dynamic, could contain 10 values or 1000.

I need to read 8 cells at the time and the content of those 8 cells to be copied into another box. After the first 8 are done, read the next 8 and so on until the list ends.

What is the best way to achieve this?

Thanks,
Alex

int i=0; String str="";
for each row in DT
{
str = str + row.item(x).toString; //x is the column no
i = i + 1;
if (i==8)
{
console.write (str);
i = 0;
str = “”;
}

}

Hi @AlexMt,

Please share your excel document with us if that’s not confidential. If it is, create a dummy sample file to show us what you require exactly. This will help others to assist you better.

Regards,
Siddharth

1 Like

Hello,

Thank you for your reply

I have attached a test file with the values that I need to copy, 8 at a time, to another application. These copied values must be separated by a comma. Please keep in mind that the number of values in the file is dynamic. Could contain 10, 100 or more values depending on the day

test file.xlsx (8.8 KB)

DivideDatatable.zip (18.6 KB)

@AlexMt run this workflow and see the output in the “sheet2” of the excel file. Let me know if this helps.

1 Like

Hi,

The activity after “Read Range” could not be loaded because of the errors in the XAML. Could you please resend the file?

Thanks

Hi Alex,

You need to install the packages for the workflow to run. Check UiPath Studio for “Manage Packages”. Click on it. You’ll get all the packages. Just install the ones you need and you’re good to go.

1 Like

I did that and still have the same issue.

Thanks,

Alex

Hi Skini76,

Where would I go to input this code?

What I have given you is the logic, which you have to translate into workflow. My assumption is your basic related reading excel is clear, if not please go though the tutorials before you start.