xlsx which was opened before in less than 1 second now opens about 15-20 mins

Issue #1030 resolved
Anirain
created an issue

In attached file calls of merge_cells at worksheet/worksheet.py from parse_merge() for cycle from reader/worksheet.py causing slow down, especially at the end of parse_merge cycle. In this case it has 13515 merged.mergeCell, near the last iterations one cycle lasts about ~0.5 seconds. File had data range in 63 cols, 463 rows, I deleted it, cause it does not matter for this case.

Uploading also worksheet.py with prints just to see it.

Tried on:

windows 10/64 bit/ python 3.6.4/lxml 4.2.1.0/openpyxl 2.5.3

ubuntu 16.04/64 bit/ python 3.6.3/last lxml/last openpyxl

Using this code to open xlsx:

# -*- coding: utf-8 -*-
from openpyxl import load_workbook

file_name = r'd:\thiska.xlsx'
wb = load_workbook(file_name) # <- this taking too long time
ws = wb.active

Comments (4)

  1. Log in to comment