Save Excel Files with specific name

Hi I have got excel want to save it as a new file with their name according to Sheet 1 : A1 and B1’s name.
Eg. I got write range “C:\Users\Test\Phone.xlsm” “Sheet1” “A1” output
want to save name as A1 (1234) and B1 (2345) so the new name should be 1234_2345

@koolrc812

Then as you required create using build datatable activity then add the column names as you want then while writing excel use that datatable it will work

Thanks
Varun

Sorry forgot to mention that the value for A1 and B1 will keep on changing. Not constant values. How to input in Build Data Table?

@koolrc812

Please follow these steps

  1. read data into a datatable dt1
  2. Use Add new Column activity with column name as “combined name”
  3. Add an assign activity
    Put this in the left-hand side of the assign
    dt_ExcelData.Columns("combined name").Expression
    Put this in the right hand side "[columnA]+'_'+[columnb]"
  4. Remove the first two columns using remove data column

Cheers

yourDT.Rows(0)(0).ToString will give you A1

yourDT.Rows(0)(1).ToString will give you B1

So put this in the filename property: yourDT.Rows(0)(0).ToString + “_” + yourDT.Rows(0)(1).ToString

Im a beginner, I cant find the read data in the activities. is it possible to screen shot? not quite can follow

@koolrc812

It is read range activity to read data from exce in to datatable

Hope the remaining activities are there accordingly

Let me know if you need more details

Cheers

You should do the free training on the UiPath Academy web site. It covers how to do these basic things.

planning to but hope can get it done soon as needs to submit. Thanks heaps

@koolrc812

Please find it


Agree with @postwick

cheers

I think you don’t understand what he’s trying to do. He wants the values in cells A1 and B1 to be used for the filename of a Use Excel/Write Range.

@postwick

Ooo…my bad…then I guess you already posted the correct answer

1 Like

Thanks heaps guys!!! let me try to work on them.