Problem with Print_Titles

I’m having problems with the Aspose.Excel component – specifically with the setting PrintTitleRows and / or Copying sheets.

For example: If I define a range for Print_Title (either in an Excel designer OR with the Apose.Excel component) and then I use Apose.Excel to copy that sheet, I get the following error:

Cannot be the same as built-in name.
Old Name: Print_Titles
New Name: ______________

I can get rid of the error if I remove the Print_Titles range, but I don’t want to do that.

I discovered something else that is very strange. I can also get rid of the error by NOT renaming the copied Excel Sheets. Right now, I’m naming the sheets based on certain dates (i.e. 02-05-2005, 02-10-2005, etc…). When I name the sheets this way, I get the error.
However, if I DON’T rename the sheets, or if I name them something germane like "Steve1, Steve2, Steve3, etc…) I won’t get the error.

I don’t understand this.
Any ideas?
-Steve

Hi Steve,

Which version are you using? Have your tried the



If the problem still occurs, please send your designer file and sample code to me. Thank you.

@sstchur,
Aspose.Cells has replaced Aspose.Excel which is no more continued and discarded now. The new product contains all the latest features available in different versions of MS Excel. You can set variety of print options like print area, print titles, print grid lines, print headings and many more. Here is an example that can be used to set print titles using this new product.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET

// Instantiating a Workbook object

Workbook workbook = new Workbook();


// Obtaining the reference of the PageSetup of the worksheet
Aspose.Cells.PageSetup pageSetup = workbook.Worksheets[0].PageSetup;

// Defining column numbers A & B as title columns
pageSetup.PrintTitleColumns = "$A:$B";

// Defining row numbers 1 & 2 as title rows
pageSetup.PrintTitleRows = "$1:$2";

// Save the workbook.
workbook.Save(dataDir + "SetPrintTitle_out.xls");

Here is the link to a documents that provides more details about setting print options and a variety of Page Setup Features:

Setting Print Options
Page Setup Features

Here is the link to the latest free trial version of this new product:
Aspose.Cells for .NET (Latest Version)

We have created a complete runnable solution which contains hundreds of examples that can be tested without writing any code. It can be downloaded here.