Trying to add data in my columns after the extracting data from application

Hello All,
Could you please help me on how to write down the extracted data from web page into some columns in excel file which was in share-point directly without downloading the excel file and uploading into share-point…

Initially my excel file contains usernames in “A” column my bot should search with the username in web application and get the data belongs to the each and every username and should write down data in columns “B” and “C” in the same excel file which was in share-point…
Below are the steps which i was followed:
1.Get the files in share-point
2.Used the for each to populate the username in web application
3.Stored the extracted data in variable as in picture

5.used the write range as in picture but getting the error

@Vamsikrishna_Talam Can you please check is the data table has data by getting the rows count. Also, use excel scope and see how it goes

Is the Excel file open? Make sure you’ve closed it.

The entire automation is with Microsoftoffice365 package to automate the files in share-point, so there is no excel scope in that package.

I am using the Microsoft office 365 package to automate the SharePoint files directly, so there is no possibility to open the excel file.