Insert new column

Hello,


I want to insert a new column. I have following code inserting a column:

worksheet.getCells().insertColumn(int, boolean);

What does a boolean value represent?

Regards,
Jash

Hi,


Please see the documentation of Cells.insertColumn() method:

insertColumn

public void insertColumn(int columnIndex, boolean updateReference)
Inserts a new column into the worksheet.
Parameters:
columnIndex - Column index.
updateReference - Indicates if references in other worksheets will be updated.

So, if you put “true” for the second Boolean parameter, it will also update formula cells of other worksheets (in the workbook) if required.

Thank you

Thank you for the solution.

Hi,


Good to know that you understand it now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.