NPOI Version
2.7.2
File Type
Upload the Excel File
Please attach your original Excel File to help us reproduce the issue
import.xlsx
Reproduce Steps
Create a project, and paste the code below.
static void Main(string[] args)
{
string filename = "import.xlsx";
IWorkbook doc = new XSSFWorkbook(filename);
int insertRow = 2;
var sheet = doc.GetSheetAt(0);
sheet.ShiftRows(insertRow, sheet.LastRowNum, -1);
using (var ms1 = File.OpenWrite("out.xlsx"))
{
doc.Write(ms1, false);
}
doc.Close();
}
Issue Description
after calling the ShiftRows function, the output file will be corrupted due to the invalid shared formula.
NPOI Version
2.7.2
File Type
Upload the Excel File
Please attach your original Excel File to help us reproduce the issue
import.xlsx
Reproduce Steps
Create a project, and paste the code below.
static void Main(string[] args)
{
string filename = "import.xlsx";
IWorkbook doc = new XSSFWorkbook(filename);
int insertRow = 2;
var sheet = doc.GetSheetAt(0);
}
Issue Description
after calling the ShiftRows function, the output file will be corrupted due to the invalid shared formula.