PHPOffice / PHPExcel

ARCHIVED
Other
11.46k stars 4.19k forks source link

Bug in removeColumnByIndex() #1114

Open shadoWalker89 opened 7 years ago

shadoWalker89 commented 7 years ago

Hi,

When using removeColumnByIndex() method to remove a column, a weird behavior happens.

The problem appears only if the cell on the last line of the column is empty. If so, it's value will be set to the value of the previous column.

An example could be :

We have three columns : A | B | C

The last line of the file is like this

val1 | | val3

column A : val1 column B empty with no value column C : val3

If we remove Column A and C, then the cell on the last line of Column B will be set to val1 Which is the value of column A

PowerKiKi commented 7 years ago

Please provide a Minimal, Complete, and Verifiable example of code that exhibits this issue. And also mention what version of this project you are using. That way there will be more chance for the issue to be solved.