In the specified process, I’m using “Write Cell” activity (Classic). I want to use counter mechanism to increment from specified cell (F6) how should I do it.
I don’t want to use modern activity.
Thankyou
In the specified process, I’m using “Write Cell” activity (Classic). I want to use counter mechanism to increment from specified cell (F6) how should I do it.
I don’t want to use modern activity.
Thankyou
If you have a counter then use "F" + (counter+6).ToString
Assuming counter starts from zero
If inside for loop then use index preoprty in for loop to get the counter
Hope this helps
Cheers
You can use For Each row activity, in properties you can create a variable for Index
Now you can write in acitivity as “A” + (Index +1).ToString
Hope this may help you
Thanks,
Srini
@Srini84 My counter value is pdf page number. It starts from 1 so should I assign.
Should it be
Pdfpageno = Pdfpageno + 1
If Im using while condition
Pdfpageno >0
If you are using Do while condition then
You can use your PDFpage counter only
So the PDF page counter starts with with 1 then you don’t need of +1 to add
Hope this will help you
Thanks,
Srini
Ok, Thankyou I’ll try let you know
I guess your condition should be pageno <= totalpagecount
Else the bot would run for infinite loop as the page no will always be >0
Cheers
Ok, I’ll try to add this condition as well and let you know thankyou
Is this correct or do I have make any changes.
Extract pdf gives the count of page. I want to loop activity that many times.
There is one string that I want to write into cell according to page count of pdf
Are you decrementing the extrapdfcount variable?
If not again the loop will be infinite
Cheerd
In this I want to write
if page count 3 then I want to write in F6,F7,F8
Then use for loop with enumerable.Range(6,pagecount).ToArray
then it runs from 6 to 8 and can be used inside the activity
Cheers
What is Csn?
And should I write that condition in.loop or cell range?
The value I want to write is not extracted from pdf.
In excel the value is
Header
ABC
I want to write ABC depending on pagecount
Sorry For not explaining it properly. I will work on that
Thankyou
If using while loop then condition must include to add a counter and chekc the counter number
Else use for loop with above condition
Cheers
hi @Bhushan_Nagaonkar ,
Greetings!
Lets says you are reading the data from a txt or pdf file, if you have say 4 lines, you wanna write the values in F6,F7,F8,F9.
For this I can suggest you two options.
or
if you wanna do the writing part at once in the end of each file
That might help you up!!
Thanks
Aditya
I tried solution from both of you. It didn’t work.
Maybe I didn’t phrase it right.
Let me Rephrase -
I have to read page count of pdf. The variable I used is “extractpdf” to get the count. I want to use “extractpdf” as counter to auto increment write cell classic activity.
The autoimcrementing value is type String. Which I will read from excel
For eg
Header
ABC
If extractpdf is 1/2/3 then I want to write in excel sheet Range is F6.
If “extractpdf” gets the page count as 2 it should write in CELL F6&F7 simultaneously.
If 3 then F6/F7/F8.
Sorry for inconvenience caused.
Thankyou
As I understamd uou want to use write cell in aloop for those many times as the extract pdf count would be
For that follow the steps
Enumerable.Range(6,extractpdfcount).ToArray
and change type argument to integer(or in latets generally automatically it would take if not degrade to 22.10 or use .Cast(of integer)
"F" + currentitem.ToString
Hope this helps
Cheers