Tab names changed to Sheet 1- Sheet 2 etc

Hi Lawrence,

We downloaded and tested the new version of Aspose.Excel to fix the problem we had with Too Many Formats, and have a new issue. All of our tab names have been removed. Instead of indicating the name that we assigned, they have reverted to Sheet 1, Sheet 2 and so on.

Also, when we purchased Aspose.Excel, we purchased Aspose.PDF so that we may convert our output to PDF format. We are getting the following error:

Invalid ColumnsSpan number: 27

I sent you the spreadsheet that we are attempting to convert to PDF format in an e-mail. This sheet was created using Aspose.Excel by taking multiple templates, and assembling them into the final workbook. Note all of the tab names (Sheet 1, Sheet 2 etc). Not sure if this issue should be logged with you, or with the Aspose.PDF team.

Thanks,

Eric P.

Hi Eric,

I haven’t received your file. Please send it to excel@aspose.com.

About your problem:

1. Do you use the code similar to:

Excel excel1 = new Excel();
excel1.Open(“c:\template1.xls”);

Excel excel2 = new Excel();
excel1.Open(“c:\template2.xls”);

Excel finalExcel = new Excel();
for(int i = 0; i < excel1.Worksheets.Count; i ++)
{
if(finalExcel.Worksheets.Count - 1 < i)
finalExcel.Worksheets.Add();

finalExcel.Worksheets[finalExcel.Worksheets.Count - 1].Copy(excel1.WorksheetsIdea;
}

for(int i = 0; i < excel2.Worksheets.Count; i ++)
{
if(finalExcel.Worksheets.Count - 1 < (i + excel1.Worksheets.Count))
finalExcel.Worksheets.Add();

finalExcel.Worksheets[finalExcel.Worksheets.Count - 1].Copy(excel2.WorksheetsIdea;
}

We change Worksheet.Copy method. It won’t copy the source sheet name.
We find that generally users use Worksheet.Copy method to copy worksheets from different files to a single file. But there may be same sheet name in several files. For example, “Sheet1” in file1 and “Sheet2” in file2. When they are copied into one file, there will be name conflicts if we copy the sheet name.

If you are sure there will not be same sheet names in different files, you just need to add one line of code after you copy the worksheet.

destWorksheet.Name = sourceWorksheet.Name;

2. About the xls2pdf problem, do you use the latest version of Aspose.Pdf?
When we get your spreadsheet, we will check this issue ASAP.

Hi Lawrence,

Had sent it to Nanjing. Resent to excel@aspose.com

Thanks,

Hi Eric,

I still haven't gotten your emails. Anyway, I think that may be a bug in the old version. Please try the latest version at