Forum Discussion

ruben_BE's avatar
ruben_BE
Frequent Visitor
7 years ago
Solved

Add a column with the sheet name

Hi all,

 

after getting my data from an Excel sheet, I want to add a column with the name of the worksheet (not the workbook) as a value.

 

Example:

I get my data from Actuals2018.xlsx with sheets January , February , March , ....

 

The table in the sheet January has three columns as follows:

Date - Customer - Amount

 

I want to add a column named "Month" whith the value of the worksheet name which is "January" in this example.

 

Can someone help me out?

 

Thank you very much in advance!

 

Br,

Ruben.

  • Anonymous's avatar
    Anonymous
    7 years ago

    ruben_BE

    Yes. You can create a custom column based on the Date field.

    Date.MonthName([Date],"en-us")



    Regards,
    Lydia

3 Replies

    • ruben_BE's avatar
      ruben_BE
      Frequent Visitor

      Hi Lydia,

       

      thank you for reply. 

       

      When applying this method, I don't get to adding the 'Table name' or de 'Worksheet name' as a value in a new column. I can only create a new column based on values in other columns.

       

      Thank you very much for your assistance!

       

      Best regards,

      Ruben.

      • Anonymous's avatar
        Anonymous
        Not applicable

        ruben_BE

        Yes. You can create a custom column based on the Date field.

        Date.MonthName([Date],"en-us")



        Regards,
        Lydia