How to copy only schema of data table to another data table

Hi all,
In my process I have one excel
image

I want to create exactly same excel without data.
Note :- Excel header row is on 4th index and data starts from 5th row and I am using Modern activities in project.

can someone please help me with the scenario.

Thanks in advance.

@Ulhas_Guttikar

  1. First copy the excel file into destination location.

  2. And then use Delete Range activity inside Excel Application Scope activity and pass range as “A5” to delete all the data.

@Ulhas_Guttikar ,

  1. Read the first exccel as a datatable
  2. Create another database variable
    3.Use assign activity with the new variable
    dtbNewTable = dtbExcelInput.Clone

This will copy the structure alone to your new datatable without table data

1 Like

Thanks for sharing. It looks very helpful as usual.

Hi @Ulhas_Guttikar ,

You could also try the below Approach, it is similar to other suggestions, Except that we use Write Cell Activity to Clear the Data in the Excel Sheet as required :