Hello,
I have a question about writing to Excel cells.
Normally, cells are written from top to bottom, but is there a way to write cells from bottom to top?
I’m not sure how to approach this, so I’m reaching out for guidance.
Could you please provide me with the code or method for achieving this?
Thank you in advance for your response!
You can try below waydt:
=> Use Rad Range Workbook to read the excel and store it in an data table say dt. If it has no headers make sure to remove Add Headers option.
=> Use the below syntax in Assign activity:
dt= dt.AsEnumerable().Reverse().CopyToDataTable()
=> Use Write Range Workbook activity to write the data back to excel.
Input:
@Yoichi
Hello!
Thank you for your response!
To provide more details: Assuming the starting cell is A6, I would like the first input to go to cell A6, the second input to A5, the third input to A4, the fourth input to A3, and the final input to A2. Additionally,
when I implemented the code based on your advice, the results were as shown in the image below.
Could you suggest any alternative methods or codes for achieving this?
Thank you!
@mkankatala
Hello!
Thank you for your response!
To provide more details: Assuming the starting cell is A6, I would like the first input to go to cell A6, the second input to A5, the third input to A4, the fourth input to A3, and the final input to A2. Although the code you provided is excellent, it seems slightly different from what I’m looking for. Could you please share the code developed according to the description above? I apologize for any inconvenience.
Thank you!
@Yoichi
Thank you for your response!
It seems to be working well.
Could you please guide me on how to adapt the code if the starting cell value is A32?
Thank you!