Writing multiple sheets in a excel workbook

hii guys,got with a error quite easy but unable to overcome it.i have a excel sheet with one column having product names,i have to scrape the data and store each product details in each sheet,i could able to scrape the data but while writing the data by using append activity and i used counter variable at sheet to increment the sheet for each iteration of product,but it don’t work as expected.even i used write range activity of excel it is writing but for every iteration it is writing the data including with previous data also.outputdata.zip (33.4 KB)

No worries buddy
I hope you want to write in the same excel workbook but on different sheets,
in that case
–mention in the excel application scope with file path as
“mobiledata.xlsx”
–in the write range mention the sheet name as row(0).ToString
–No need of counter with assing activity
this would create new sheets with the name as value in row(0).ToString

Hope this would help you
Kindly try this and let know buddy
Cheers @venkatmalla6

1 Like

@venkatmalla6 - looking at your rough.xaml it is creating separate excel workbooks because you are including the counter in the Workbook name of the excel application scope. Remove the counter from there (you only want 1 workbook, not multiple) and instead include the counter in the write range activity so it says “Sheet” + counter.tostring instead of “Sheet1”

Another option is to name the sheets after the product. If you want to do that, then follow the instructions @Palaniyappan wrote. If you go this route, make sure all product names are unique or you will overwrite data already existing in the sheet.

2 Likes

@Palaniyappan hii buddy, i tried it is writing not as expected just look at my excel file and have a look at my xaml file also.its urgent to me.thankyououtputdata.zip (31.7 KB)