Hi Everyone, I have a scenario where i need to re arrange my excel columns. The data is misplaced in some columns i want to re arrange those columns.
I have few columns, example D & E columns. E column have some numeric values and I want E column total but the total value is available in D column end i want to copy and paste in E column.
Pease have look at the excel attachment below for your better understanding
Note : This is a System generated Excel.
I’m attaching my sample excel below for reference. It is having both input and Output.
Hi @Anil_G in D column also. It’s not about only last column but sometimes we may get in between also , suppose if i take D & E columns. It have 5 rows. 1 row value is in D column and rest in E column. How to handle this kind.
If you see this screenshot value column in empty and it is having only 1 row data and i want to move that to value 2 after moving that value i need to delete the VALUE COLUMN.
Even stock column also it is having 1 row data i want to move that to stock record column and after that i need to delete STOCK COLUMN.
Two things here…if always the data is misplaced in value and stocks columns only and if it needs to be added at the end or at the last blank space we can do that …
Try below logic
Use a index variable for index property in for loop
2 Use for each row in excel activity
Inside the loop use if Not String.IsNullOrEmpty(currentRow.ByField("Value").StringValue)
On then side use write cell activity with value as currentRow.ByField("Value").StringValue and range as Excel.Sheet("SheetName").Cell("F" + If(String.IsNullOrEmpty(currentRow.ByField("Value1").StringValue),index,index+1).ToString)