How to change excel file as table

How to change excel file as table format, if i have 10 excel files how to change them all into excel files


You can use create table activity in loop


can you share the input and out sample


I have 10 excel files in a folder I have to change all the data into table format

I have 10 excel files in a folder

this ok

I have to change all the data into table format

show the sample this then easy to build code


Book1.xlsx (8.5 KB)
Book2.xlsx (8.5 KB)
I need to convert this two files at a time in table format


  1. For each file in folder
  2. Inside loop use excel file with currentfile.FullName
  3. format as table with range as excel.SelectedSheet


Hi @anjani_priya

To change Excel files into table format in Excel, you can follow these steps for each Excel file:

  1. Open Excel File:

    • Open the Excel file that you want to convert into a table.
  2. Select the Data Range:

    • Click on any cell within the data range you want to convert into a table. This should be the range that you want to include in your table.
  3. Create a Table:

    • Go to the “Insert” tab in the Excel ribbon.
    • Click on the “Table” button. This will open a dialog box.
  4. Confirm Data Range:

    • Ensure that the correct data range is selected in the dialog box.
    • If your data has headers, make sure the “My table has headers” option is checked.
    • Click “OK” to create the table.
  5. Format the Table:

    • Excel will now convert your selected data range into a table format.
    • You can format the table further by giving it a meaningful name in the “Table Name” box in the Design tab that appears when you have the table selected.
    • You can also apply specific table styles, if desired.
  6. Repeat for Other Excel Files:

    • Close and save the Excel file that you’ve just converted into a table.
    • Repeat these steps for each of the 10 Excel files you want to convert into tables.


Hi @anjani_priya

You can try this steps

  1. Assign activity:
    filesArray = Directory.GetFiles(“YourFolderPath”, “*.xlsx”)

  2. For Each activity:
    For Each file In filesArray

  3. Excel Application Scope:
    Input: excelFile (from For Each loop)

  4. Sequence:
    Read Range:
    Input: excelFile
    Output: dataTable

  5. Build Data Table:
    Output: structuredTable

  6. Write Range:
    Input: excelFile
    Output: structuredTable

All excel files should be converted into data tables format how?

You can Check out this thread Once @anjani_priya

Hi @anjani_priya

you can try this way

Xaml : - Excels to (2.3 KB)

out put :slight_smile:


let me know its working or not

I have to convert into datatable

Try above xaml it will work and


Note : - if you need this as output just disable the headers

  1. Read range workbook Activity

  2. write range workbook activity


In excel if we press ctrl+t then it will change as datatable how can we do that in UiPath


If this resolves the issue…can you please close the topic


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