Removing column of Excel sheet using NPOI(

Jul 21, 2012 at 7:19 AM


I'm trying to find a column and delete it, but I don't know what a method for remove a column.

I tried remove cell, code as below. But I want remove complete column.

HSSFRow row = (HSSFRow)Sheet.GetRow(r);
HSSFCell newCell = (HSSFCell)row.GetCell(nIndex);

the code above just clears content of cell. do not remove cell. I am now looping all the rows to clear all cells of specific column.

Now, I was searching something called column shift, but there does not seems to be a method for this. Please let me know if there is a method of NPOI for column shift.

.net Framework-3.5 VS 2008 NPOI(


sham yemul,

Jul 31, 2012 at 6:03 AM

I still could not get any solution and waiting for suggestions from experts, NPOI developers




Aug 4, 2012 at 11:59 PM

So far, there is no support for that. If you really need that, you can buy professional service, maybe we can help you customize some code. Please contact me via for details.

Aug 5, 2012 at 5:45 AM

dear tony,

thanks for response.