This project has moved and is read-only. For the latest updates, please go here.

IXLRange insert column

Aug 30, 2011 at 2:43 PM

There is a bug with function

 IXLRangeColumns IXLRange.InsertColumnsAfter(int numberOfColumns, bool expandRange)

it works like InsertColumnsBefore

Aug 30, 2011 at 3:02 PM

How can I reproduce it? The following works fine:

            ws.Cell("A1").Value = "A1";
            ws.Cell("B1").Value = "B1->C1";

            ws.Range("A1").InsertColumnsAfter(1, true); // Also works with false

            // It also works with:
            // ws.Column(1).InsertColumnsAfter(1);
"A1" stays on A1 and "B1->C1" moves to C1.

Aug 31, 2011 at 11:09 AM

I tried to reproduce it for the past day and failed. It's good enough for me. I hope that it was my bug or something. I don't understand because yesterday the same code repeated the bug every time.

The problem is that i use your library in a proof of concept project of mine and the series of commands is not so simple like in your case so i had troubles extracting the code. I rearranged the code so now i can't reproduce it.

I probably removed some small part of code that caused it or changed the template file in excel editor somehow, anyway, i hope it was my bug or something. Thnx for reply.