How to use the value from excel as a name to create a new document

i need to copy a value from the existing excel sheet as a name for a new excel document. I already used read range and build data table. But I don’t know Which activity can copy the value and paste it to rename the document

  1. use Foreach row activity, inside that use assign File_Name = row.item(“COLNAME”)->COLNAME = from which column you need to pick the file name.
  2. use move file activity and use input(path and name of the file you want to save as) and destination(path and Variable File_Name).
1 Like

Hi Divyashreem,

Thanks for your suggestion, but i’m kind of new to this. Could please explain a little bit more detail how to use it?

thank you so much!

what is the column name in excel from which you want to retrieve the file name.?


I’m trying to use column V & W as a new name to retrieve the file name.

If new document is in a datatable, ready to be saved, you can use this logic (16.0 KB)

If the new file already exists, you can simply use copy file activity after step 2 with destination as nameTakenFromCell + ".xlsx"

1 Like

Hi farhan94,

Thanks for your reply. But how can I output the document name one by one as my picture shows?(eg: the document name is:100081211Shenzhen Limited1, 1000081212Shenzhen Limited2, etc)

Thanks again for your help

In this case you’ll have to use a for loop as @Divyashreem mentioned earlier. I’ll upload the updated workflow in a while

thank you so much for the help!!!

1 Like

I dont know your exact requirement. But this must give you an idea. Here I save the same data table with filenames (supplier code+supplier) from all the rows. (16.2 KB)


thank you so mcuh!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.