Add data to Excel template

I have to add the data into an excel template. I have queue item which has language and value for example:- Language - English
Value- good
The bot will search the value in a app and get all the data after that i have to open a excel template where i have to add all this details in each specific section and the sheetname should be always the value(example good) It have alot of value for one language so it should add the sheet name as per the value which we have from the queue and if the bot finds another language then it should save the previous excel with the language name and open a new excel and do the same steps. Can anyone please help me out with this?

@AAH

What you need to do is…when you get your queue item as you have the lang and value in it already, whenever you use the read range or write range activities to write or read the data use first check if the required file is present you need file with English then check using file exists activity and give the path and instead of english use Path.Combine("FolderPath",TransactionItem.SpecificContent("Language").ToString + ".xlsx")

If this gives true proceed normally else copy the template file using copy file activity and give the destination as the above path

Now for sheet whenever you us write range use TransactionItem.SpecificContent("Value").ToString

And if sheet is not present excel will create it…it has an option create if not exists

or if you want the template then use copy sheet activity and copy the sheet and use name as given above

as these are variable when queue item changes automatically name and value would change

cheers

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