I need to generate A-Z in uipath with code is that possible
Yes that was doable you can set an array of character and loop on it! @soumi_soumiya
cheers
Happy learning
Hi
We can use this expression inside the while loop
In while loop use condition like this
Counter < 26
Where counter is a variable of type int32 with default value as 0 defined in the variable panel
—now inside the loop use a write line activity like this
Convert.ToChar(65+Counter).ToString
And next to this Writeline activity use a assign activity like this
Counter = Counter + 1
Cheers @soumi_soumiya
Try with the following code,
Enumerable.Range("A"c, 26).[Select](Function(x) CChar(x)).ToArray()
Thanks for your reply…
I had also got the other solution related to what you said it work good but I have a doubt that
Convert.ToChar(Convert.ToUInt16(input) +counter) can you explain this why UInt16
@soumi_soumiya, try this-
Enumerable
.Range(0, 26)
.ToList()
.ForEach(i => Console.WriteLine(Convert.ToChar(i + 65 + 0)));
Try this
Enumerable.Range(0,26).Select(Function(x) Convert.ToChar(Convert.ToUInt16("A"C)+x)).toarray
Regards
Sure
It’s ToInt16 which will convert the input variable to integer
And adds that with counter variable which will give us 65
So converting this 65 to it’s equivalent ASCII code with ToChar will give us A as output
This is how it works
Cheers @soumi_soumiya
Were we able to get them
Kindly let know for any queries or clarification
Cheers @soumi_soumiya