I am trying to create a new column in the middle of an existing .xlsx sheet, but I can't find any way to do it.
XSSFWorkbook workbook;
await using (var file = new FileStream(@"File.xlsx", FileMode.Open, FileAccess.Read))
{
workbook = new XSSFWorkbook(file);
file.Close();
}
var editSheet = workbook.GetSheetAt(0);
await using (var file = new FileStream(@"File.xlsx", FileMode.Open, FileAccess.Write))
{
workbook.Write(file);
file.Close();
}
I am able to easily create a new row using editSheet.CreateRow(2)
but I can't find anything similar for creating a column.