0

Hi,

I am trying to open a large excel file (.xlsx) to ad some rows of data from another excel file. However, due to the size of the destination file i am getting the memory error. I tried the below, however when i create the worksheet object it is creating a readonly worksheet and i am unable to add data.
wb=load_workbook('Test.xlsx',{'constant_memory': True})

Can someone tell me how to open the large excel file using openpyxl load_workbook method in write only mode?

Regards,
Dinil Karun E

4
Contributors
5
Replies
36
Views
7 Months
Discussion Span
Last Post by ddanbe
0

I don't think it is possible. Using pydoc openpyxl.load_workbook shows a read_only option but no write_only option. It seems to exist only for new workbooks. I think using large excel files is questionable. Why not write a csv file with
python, then perhaps convert it to xlsx through other tools ?

Edited by Gribouillis

0

Just because I'm trying some python stuff I looked at priors on this issue. Not once did they fix your issue except by changing to another Excel reader/writer or change to other than Excel for the data source. Other times the responders chided the OP about using Excel like this. So I take it you did your own research and found same. Your choice on the next move.

0

can you help with how it can be done using other excel writer? I am unable to find out a way. I am stuck with not being able to open the large excel file (.xlsx)

0

@dinikarun, Sorry no. I only did a little research and your complaint is not new. But the answers in the prior discussions was to try other readers. This sounded to me that the OP has to do that testing and work.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.