Workbook write range activity not working when i run it for the 2nd time. 1st time it was working fine after deleting the sheet in workbook and trying again it is showing object reference not set to an instance of an object

Hi All,

My usecase is pretty simple. i just have to copy data from one sheet in a workbook(.xls format) and paste it in an another workbook dynamically creating a sheet(.xlsx format). when i tried it, it worked well for the first time. i deleted the sheet in the workbook and tried pasting it again. it should have created a new sheet in workbook and pasted it just like it did first time. but i am getting error as “object reference not set to an instance of an object”.

Now, i am not able to do anything in that sheet. read range and write range also gives the same error.
(Note: I don’t have excel i am working libre office software for accessing .xlsx format files .).

Kindly help me with this one.


Could you please try the same with other excel file once and check it.

yes . i tried it . it is working. but i have to paste in the excel sheet they provided me. when i create a new excel sheet and paste the data from excel they provided . it stops working…

1 Like


It seems like some issue with libre office.

is there a solution for it? or is it because of the data? .data may be corrupted.


Just read the data from that Excel file and create same new excel file and write into it.

Found what is creating this error . but not sure why… the excel workbook given to me where i have paste the data already consists of two sheets . The second sheet consists of some data derived from formulas. if i delete the second sheet it is working fine. i dont know whether it is the second sheet or data inside it causing this error.