We are trying Spire.Xls 9.7 for use in our products.
And I found the issue.
The named cell 'NAMED CELL' is defined in 'Sheet2' of 'template.xltx', that a referenced from the cell of 'Sheet1'.
Run the following code on this file.
- Code: Select all
using (var workbook = new Workbook())
{
workbook.LoadTemplateFromFile("./template.xltx");
workbook.Worksheets["Sheet2"].Remove();
workbook.SaveToFile("./issue.xlsx");
}
The generated "issue.xlsx" be opened in Excel, warned that it contains links to external files.
When checking the definition of the name with Ctrl + F3, the value of 'NAMED_CELL' is '{...}' and the reference range is '#REF!$B$2'.
This behavior is different from Excel, open 'template.xltx' in Excel and manually delete 'Sheet2', and the value of 'NAMED_CELL' is '#REF!', Reference range is '#REF! #REF!' And no warning.
I want to get the same result as Excel.
Thanks in advance.