Excel columns Manipulation

Hi,

I have A.xls which contains multiple sheets and each sheets has its own name: s1, st2 etc. For each sheets,for example-sheet: “s1” there are columns: “C” to “P”. I want to shift the values from columns: D to O to columns: C to N and leave column O as new column to input the new value in column:O. note that first row contains header. I would like to do the same for other sheets as well until all sheets completed.

How can this be achieve in automation? Thank you.

1 Like

Hi @yhlll

Use For each item in wb.getsheets

Use Excel Application Scope and use Select Range

Use Send hot Key as ctrl+C and paste it to another sheet write range

Thanks
Ashwin S

1 Like

Hi AshwinS2,

Possible you can explain on how the wb.getsheets as the sheets will be different sheet name.

Yes

Excel application scope in that pass workbook variable in workbook property and then use for each item in wb.getsheets

Thanks
Ashwin.S

1 Like

b4_shift

Hi,

Need to shift Jul-19 and Aug-19 columns to one column to the left.
After that, remove the Aug-19 column and add in Sep-19 Column, those cells under Sep-19 will be manual input.After_shift

Need to do the same for Sheet 2 as well

Hi @yhlll

Use delete range and delete the column A where June would be deleted and after that use assign dt=Dt.clone

Based on that you can use write range activity for all sheet 1and sheet2

Thanks
Ashwin.S

The column A contains formula need to preserve the column A cells. How can this Column A be preserved? For write range activity from sheet 1 to sheet 2, how can this be done?

Hi @yhlll

Based on the structure use dt =dt.clone

Thanks
Ashwin.S

Capture1 Capture2

Sorry, do not understand. Can explain more? I have attached the screenshots of the current uipath screenshot of what I have written.

SheetNames.xaml (11.4 KB)

Manage to shift one column in “Sheet1”. However, the column is not shift to one column to the left in “Sheet2”. What can be done?