How to get the sheetnames are write that in a column

How to get the sheet names are write that in a column but it shouldn’t take the names of sheets already present in that column.

Hi,

Please elaborate more with example. So I can share the working xaml with you for your problem statement.

Thanks

In a excel file, the sheet names should be retrieved and write in a column but if any sheetnames already present in that column, that sheet names should not be considered.

1 Like

Hi,

Please find the attached xaml file:-

Get Sheet Name forum.zip (10.3 KB)

If it works for you, please mark this post as solution, so other can refer the same. :slight_smile:

Thanks

Hi @anjani_priya

Can you please share the excel file.

Regards

the sheetnames in the column are dynamic

1 Like

@anjani_priya

Use get workbook sheet activity

and before writing that to a column of excel use the below expression

arr_sheets.distinct

Hi,

I use 1 datatable with some column names.
I fetch column names in a array

Then I read input excel file. Fetch the sheet names in a array.

Compare column name & sheet names arrays & find the missing sheet names which are not present in the datatable using linq.

Then I am adding those sheetname as a column in datatable.

Hope this is what you expected as a solution.

Thanks

Instead of build datatable, can I use read range workbook activity…
how can I specify the column in which the values are present

1 Like

Hi,

Not getting your problem statement.

Thanks

Book 1.xlsx (24.7 KB)
in sheet3, there is a column called sheet names
The sheet names present in the column are dynamic
In that column, the sheet names should be retrieved and write in that column
If any sheet names present in that column then the sheet should not be considered.

Hi,

So in this case, bot should read sheet 1 & sheet 2. Correct?

output,sheet1,sheet2 and should be write at the end if the sheet4 value in sheet3

1 Like

Hi,

What will be there in output sheet?

So bot need to write all the sheets in new excel workbook?

yes it should retrive all the sheetnames and write in new sheet (sheet3 in my excel) under sheetnames column
if any existing sheetnames are there in that column, then sheetname should be avoided

1 Like

Hi,
I have a input file with me. Please share expected output file as well.

Thanks


output

1 Like

Hi,

Output:-

Xaml File:-
Get Sheet Name forum.zip (19.9 KB)

Thanks

Hi,

If this works for you, please mark it as a solution, so others can refer the same. :slight_smile:

Thanks

the column names should not interchange
the output and other sheet names should comes under sheet4