MY dictionary key string, datatable is not writing in excel file, when i put final output Dictionary variable to write range

Im for looping all 5 excel files by using get directory to For each loop then im reading all excel files using read range and storing into all sheetname as string key and all DT as value but afterfinal loops only the first sheet name is written then everything is not written in my final excel sheet

Hey!

Little bit of confused…

Could you please show us the input and expected output here?

Regards,
NaNi

i will attach my workflow and final excel file
to forum.xlsx (8.8 KB)
so u will get an idea
so i will take 5 excel files and its sheet name and combine them as a final single excel file
append.range.to.forum.1.0.1.zip (9.4 KB)

Hi @sathish_Kumar6

Change the scope of rowsCount variable from Body to the outer sequence (To forum)

image

Can you check if the sheet names are same within the different Excels and thats why it is overwriting in the dictionary?

Maybe you can use from the for each the index output and make the dictionary key unique for the run

it didnt work @kumar.varun2

yes as u said sheet names are almost same, only date will change for all excel files…
and u said like Maybe you can use from the for each the index output and make the dictionary key unique for the run… so this means what to do in my xaml… could you explain or could you share code if possible?

so, then it should be confirmed that by same sheet names (used for the key) you only see the last datatable within the dictionary

the for each activity has an output - Index
grafik

instead of yourDictionaryVar(yourSheetname) give a try at
yourDictionaryVar(yourSheetname & “_” & idx.toString)

and make the keys unique

1 Like

will try and will let u know