Generally in the Write Range Activity We Specify the Range as
A1:D5, This specifies that data can be pasted starting from Cell A1 To D5 The Moment it reaches D6 there will be an Error
Is there a Way That we can Do Something Like This :
A:D, In this case there will be absolute no Problem because no cell Numbers are specified Here
If you want to read/write a specific range here, you should use the read/write range activity. Since the main purpose of the cell reading/writin activity is to read/write a specific cell, it expects row and column numbers from you.
Thanks For you Reply
I have a Situation Like
Sometimes My Datatable has data like this :
and sometimes it looks like this :
My motve of saying is THe Number of Rows are not constant in my case so If I Specify a range in the write range activity My program can fail
Instead of specifying in the write range activity as “A1:D5”, specify it as “A1” it will write all the data and start writing it from A1 cell.
we can calculate the Range Information in advance e.g. DataTableVar.Rows.Count
As mentioned above, with an A1 B1, LetterDigit Range we are driven by the datatable used for the writing and can restrict it also before writing to Excel
Thanks for your Reply. I have situation Where I have to paste the data from only Column A to Column D, This is where I am getting Stuck
Can you brief about you datatable means how many columns are there.
In May case There are 12 Columns
And I want to paste the Datatable into another sheet between Column D to Column O. The Number of Rows keep on Changing every time the bot runs
Number of rows does not cause any error, if you have a datatable having 10 rows and 3 columns you can write it from cell “A1” on the other hand if you would be having 100 number of rows and 3 columns still you can write it on cell “A1”
The end range is not required, you have to give only the initial point.
Thanks @Sanjit_Pal You were Right I was just getting Confued here.
Thanks Everyone For All all your replies. Much Appreciated.
Understood. A tip on the subject has also been given above. To be more descriptive, follow the steps below.
1-First of all, read your entire input excel without specifying a range and assign it to a table (dt)
2-Extract the data you want by specifying the range you want to read. In the first case, the number of rows of the table you are reading will give you the dynamics of the cell size.
3-Do the printing process by specifying the excel you want to move your range table that you extracted to the table.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.