Bug: The same worksheet name already exists

Hi,

We have a web site that use Aspose.Cell to generate some Excel files with templates. The first Worksheet of all of our template is a read me sheet with info on the user and on the report.

On some template the first tab is named Read Me and on others Read me.

In our website when the user click on the button to generate the excel file, we load the data, format it, etc... and at the end we make sure that the first sheet is named Read me, if not we rename it to Read me.

The problem is with a template with the first sheet named Read me, everything is ok, but when a template have the first sheet named Read Me, we have the error "The same worksheet name already exists".

We don't have any other Sheet in the template with a name that could look like Read me.

We are using Aspose Total 1.4.0.6 and the version of Aspose.Cell is 4.4.0.0.

Thanks!

Hi,

Thanks for considering Aspose.

Yes the error will be displayed using your scenario, We will check Worksheet.Name property to enhance it for ascii comparisons.

Until then, I think you may try a workaround:

Workbook workbook = new Workbook();
workbook.Open("d:\\test\\readmesheet.xls");
//Get the first worksheet which is "Read Me".
Worksheet sheet1 = workbook.Worksheets[0];
//first shet to other name.
sheet1.Name = "Read me1";
//now set to your desired name.
sheet1.Name = "Read me";
workbook.Save("d:\\test\\outreadmesheet.xls")

Thank you.

Hi,

Thanks for your time.

For the workaround; we had about 10 templates with the first sheet named Read Me, so I simply renamed the first sheet for Read me and now everything is working.