We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Print_Area/Print_Titles + Excel97


I am using Aspose.Cells General logic of the application utilising Apose.Cells is as follows:

  1. Open report template *.xls file (with formulas, formating, etc)
  2. Fill marked cells with data
  3. Save report to target foder.

Generally it works fine, however I have encountered some problem I am not able to solve. End users of the reports are using different versions of Excel - from 97 to 2003 (Polish version). If I set the Workbook.Language property to 48 (Poland) then opening some of the output files in Excel97 just crashes Excel. It is strange, since some of the files open fine and some not.

If I do not set the Workbook.Language property the reports open fine in Excel97, however if the template file defines Print_Area and/or PrintTitles (Obszar_wydruku and Tytuły_wydruku in Polish) then when the file is opened the dialog pops up with title (translation from Polish) 'Names conflict' and text: 'Name cannot be the same as predefined name. Old name Tytuły_wydruku, New name:' - and I have to type same new name. It is strange, as the file has more then one sheet, and problem seems to relate to first sheet only. When I check the names in the workbook it is changed only in the first sheet, the other are ok.

The dirty solution I was able to do was to set the PageSetup.PrintArea and PageSetup.PrintTitleRows from code and PrintTitleRows cannot be set in the first sheet ??? Then the file opens in Excel97 and does not ask to change PrintTitles upon opening. Of course first sheet prints very bad.

Is this maybe a known issue. I have searched the forum, but could not find solution. What am I doing wrong?

Thanks in advance.


Hi Fred,

Could you try the attached version (

If you still find the issue, kindly post your template file, created file etc. here, we will check it soon.

Thank you.

Hi again,

Thanks for quick reply. Unfortunately the issue still persist. I will send you the files you mentioned, but the 'Keep this post private' is inactive. I would not like to send the files to public, just to you. How to do it?



Hi Fred,

Please call Worksheets.SortNames() before you call Workbook.Save() to save the file.

Works fine now. Thanks very much.