i need to get the range of the data present in the excel sheets whose range varies, so that i can write the formula to each cell present in the excel sheet
You can first do a read range with empty range which will read the entire range which has data.
Then you can manipulate the address with current row and column index.
Let’s say you have a match in particular row and column index,
Char(64+ColIndex).ToString + RowIndex.ToString
We are using ASCII for creating alphabets in the above address range manipulation
Hope this helps
Welcome to the UiPath Community @jeevan.h
You can read the entire data ij that Excel as mentioned by @Nithinkrishna
Then the rows will be simply the dt.rows.count
And first get the number of columns using, dt.columns.count
And then pass that count in the Excel formula (either in a cell in new sheet on that file)
This will give the Excel address of the last column
Give it a try, this should work!
Just to understand, will this work if column count is more than 26?
As in Excel the column address after Z is AA
Yes of course, this won’t.
But that’s just the demo and if it’s more than 26 columns we need to add a bit of logic.
but when i want to push the formula into excel and read the value. how is it possible it will again reaad the formula rite?
and its showing sytex error while i tried reading that cell
Write that into a new temporary sheet, read that entire sheet in a datatable using Read Range Workbook activity, and then use Output Datatable to convert it into a text.
Hope this helps!
How are you reading that cell?
This is the formula i am writing, excel file is not taking the formula
its trying to remove the formula when trying to open excel file
Hi @jeevan.h ,
Could you try writing it using Excel Application Scope?
I’ve noticed that sometimes the file gets corrupted when we try to write formulas into Excel using the Workbook Activities.
It worked with application scope
It worked with your formula , thankyou
Please mark the answer as solution so that others facing similar issues may benefit from it and also so as to close this thread.
Glad it worked. Mark the post as solution to close the thread.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.