How can I create a new excel sheet for every value in a particular datatable? I have a data table with a column named EMP ID, so i want an excel file containing all Emp IDs in various tabs/sheets.
So, For each Emp ID in that data table, a new sheet should be created in the excel file.
Fine
Hope these could help you resolve this
— hope you have datatable read from the excel using read range readily
— now use a for each row loop activity and pass the above variable obtained as input and inside the loop use a write range activity within a excel application scope
—that is in the excel application scope activity and mention the file path of the excel
— inside the scope now use write range activity with sheetname as row(“yourempidcolumnname”).ToString) and mention the range as “”
— this will create sheetnames with those empid
As sheet names
Kindly try this and let know for any queries or clarification
Fine
In that case we can create a dummy Datatable
Like use a build datatable activity before to this for each row loop and get the output from the activity named out_dt
— no inside the loop within write range activity use this datatable as input
But keep in mind that uncheck the Add Headers property in write range property panel
So I have an excel sheet with a particular format, When im trying to create multiple sheets of the same format with different Emp ID, it is not coping the format. Even after checking the option- preserve Format while reading the range of the datatable, the format is bot being copied.
the below is the format of the excel im trying to duplicate with various emp ID’s
Hey Palani, Ive attached the file. All I need to do is create duplicate copies of the same sheet1 with different emp IDs. in the same file. I need multiple sheets of the same format to be created in the excel file.