How to extract text and add it to excel starting from specific column to column

I have below data in site. I need to extract text & write to excel from x column
54321,name,sri sai,enabled,dc123456,+1234567888,09-23-1991,09887766,75687,OK,097UITRE
x column=54321
y column=name
like that all data need to be copied to excel
tried no luck

@vnsatyasunil

There are different types where the site can arrange your data

For a Overview

You can use Get Text activity and take the data one by one, after that you can use Add Datarow activity and using write range write to excel

Hope this will help you

Thanks,
Srini

@vnsatyasunil

Please use the start cell as the x column cell then the data would be pasted from x only.

Eg: if you give "X2" and range then the data would be pasted starting from X2

Cheers

from this result how I can pass in add data row activity

@vnsatyasunil

I guess the data is comma separated so, In add data row activity use str.Split({","},Stringsplitoptions.None) in the arrayitems

Cheers

Hi @vnsatyasunil

Just extract the data from site using get text and pass that string in the below mentioned activity.
You can simply use Generate DataTable Activity, use the following configuration.
And you can generate a datatable,
use write range and get this data to excel.

That’s a quick win :slight_smile:

Thanks
Happy Automation :slight_smile:

getting string like
output result test*****54321,name,sri sai,enabled,dc123456,+1234567888,09-23-1991,09887766,75687,OK,097UITRE#####
I need string between ***** and ##### i.e
54321,name,sri sai,enabled,dc123456,+1234567888,09-23-1991,09887766,75687,OK,097UITRE

if Strdata=*****54321,name,sri sai,enabled,dc123456,+1234567888,09-23-1991,09887766,75687,OK,097UITRE#####

You can use strData.trim(“*#”.ToCharArray)

that would remove those texts.

Thanks

not working only ##### is removing

image

I have used *# inside the trim function, can you please check again if you skipped typing *.

Because it works, please see attached screenshot

Thanks

if it starts with ***** result is coming. I mentioned before string output like this
string=output result test*****54321,name,sri sai,enabled,dc123456,+1234567888,09-23-1991,09887766,75687,OK,097UITRE#####
before ***** text may change

Ohh so your’ text starts from output result test?

If that is the case, assuming ***** would always be there, Can you try with this:

strData.Split({“*****”},StringSplitOptions.None)(1).Trim(“*#”.ToCharArray)

Screesnhot:

image

Thanks

Thanks it worked

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