Excel naming

i have a scenario where i want to name excel in a format of

excel_(yyyy-dd-mm) format

how do i do that ?

Hi @poojaskyrathore

Try the below

"excel_"+Now.Tostring("yyyy-dd-MM")+".xlsx"

Regards

Hi @poojaskyrathore

- Assign -> FileName = "Excel_"+Now.toString("yyyy-dd-MM")

Check the below image for better understanding,

Another condition -
If you have the data of date in a String variable in a different format like dd/MM/yyyy

- Assign -> InputDate = "15/01/2022"
- Assign -> FileName = "excel_"+DateTime.ParseExact(InputDate, "dd/MM/yyyy", System.globalization.Cultureinfo.InvariantCulture).toString("yyyy-dd-MM")

Check the below image for better understanding,

Hope it helps!!

@poojaskyrathore

"excel_" + Now.ToString("yyyy-dd-MM") + ".xlsx"

Hi @poojaskyrathore

"excel_"+Now.ToString("yyyy-dd-MM")+".xlsx"

Cheers!!

@poojaskyrathore

  1. Drag and drop an “Assign” activity into your workflow.
  2. Create a variable to store the file name. Let’s call it fileName.
  3. In the “To” field of the “Assign” activity, enter the variable fileName.
  4. In the “Value” field, use the following expression:
    fileName = “excel_” & DateTime.Now.ToString(“yyyy-dd-MM”) & “.xlsx”

Hi @poojaskyrathore

Try this

“Excel_”+Now.ToString(“yyyy-dd-MM”)+“.xlsx”

image

Hope it will helps you :slight_smile:
Cheers!!