Worksheets with a comma in the name

Hello,
Formulas containing a reference to a cell, which is in a worksheet whose name contains a comma, replace the cell's value with "sprᶐ", or something like that, instead of the original value/formula.
I was able to reproduce the problem with the code below, but I didn't try to reproduce it any other way, so the problem can probably be reproduced by working directly with the formula.
Also, there seems to be a problem in the name of the worksheet that was copied into the output workbook.
I have attached a screenshot of the file generated by the code to show you the problem in the cell as well as in the name of the tab in output.
I have also attached an example of a workbook in the "Input.zip" file.
Below is the code used to reproduce the problem (for Windows). I would like to point out that "Input.xlsx" was created manually.
Formulas containing a reference to a cell, which is in a worksheet whose name contains a comma, replace the cell's value with "sprᶐ", or something like that, instead of the original value/formula.
I was able to reproduce the problem with the code below, but I didn't try to reproduce it any other way, so the problem can probably be reproduced by working directly with the formula.
Also, there seems to be a problem in the name of the worksheet that was copied into the output workbook.
I have attached a screenshot of the file generated by the code to show you the problem in the cell as well as in the name of the tab in output.
I have also attached an example of a workbook in the "Input.zip" file.
Below is the code used to reproduce the problem (for Windows). I would like to point out that "Input.xlsx" was created manually.
- Code: Select all
using System;
using System.IO;
using Spire.Xls;
namespace Test
{
internal static class Program
{
private static void Main(string[] args)
{
const string basePath = @"C:\Path\To\Your\Directory\";
string sourceFilePath = Path.Combine(basePath, "Input.xlsx");
Workbook sourceWorkbook = new Workbook();
sourceWorkbook.LoadFromFile(sourceFilePath);
string targetFilePath = Path.Combine(basePath, "Output.xlsx");
Workbook targetWorkbook = new Workbook();
Worksheet worksheetToCopy = sourceWorkbook.Worksheets[0];
targetWorkbook.Worksheets.AddCopy(worksheetToCopy);
targetWorkbook.SaveToFile(targetFilePath, FileFormat.Version2016, true);
Console.ReadLine();
}
}
}