Error with 'PrintTitleRows'- 'PrintTitleColumns' and 'PrintArea'


#1

I’m using Aspose.Excel 2.8.6.1 and I’m having problems if I use one of the following properties in a Workbook with 10 or more worksheets:

- PrintTitleRows
- PrintTitlecolumns
- PrintArea

Concretely, when I try to open the resulting file excel shows the following error:

"Conflicto de nombres: El nombre no puede ser el mismo que el documento integra."

The error appears in Spanish language because I’m using the Spanish version of Excel. Translated to English, approximately this error means:

"Naming conflict: The name can not be the same than the integrated in the document"

To reproduce the the problem you can use the following code:

Dim exce As New Excel
Dim i As Integer

For
i = 0 To 8
exce.Worksheets.Add()
Next<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>

For i = 0 To exce.Worksheets.Count – 1
exce.Worksheets(i).PageSetup.PrintTitleRows = "$1:$8"
Next<o:p></o:p>

exce.Save(“c:\test.xls”)
<o:p>
Please, can you help me?

Thanks in advance.</o:p>


#2

We found this problem in some earlier version and have already fixed it. Please download and try v3.1.1 at http://www.aspose.com/downloads/Product.aspx?name=Aspose.Excel.


#3

Hi Laurence,

We have donwloaded the version 3.1.1 and the error message continues appearing.

If you execute our sample (previous post) you can reproduce the problem (remember the error appears when the file is opened by excel)

Best regards


#4

Actually I tested your code and didn’t find any problem. Please open the file in your machine and see if the errors also occurs?

If you still meet error with this file, could you please use MS Excel to open and save it as a new file and post it here? After saving it in MS Excel, I think this error will be solved. I will check the file and figure out the difference.


#5

Hi Laurence,

I think you have forgotten to attach the file.

I have generated a file (using the code of the first post) and I’m attaching it (If I open this file with a Spanish version of Excel the error appears).

Best regards


#6

Sorry for not attaching the file. Please try the attached one.

I opened your file and didn’t find any problems. I think that’s a problem of language version.

Could you please post a file without problem in your machine? Thank you.


#7

Hi Laurence,

I have opened your file and it opens correctly (without the error).

How should I generate the file without problem?, manually from excel? (without use aspose.excel).


#8

My file is also created with Aspose.Excel. Please try the attached program.

Dim exce As New Excel()
Dim i As Integer

For i = 0 To 8
exce.Worksheets.Add()
Next

For i = 0 To 9
exce.Worksheets(i).PageSetup.PrintTitleRows = "$1:$8"
Next

exce.Save("c:\nametest.xls")


#9

Hi again Laurence

I have tested your code and the error message contunues appearing.

What can I do?


#10

Please use MS Excel to create a same Excel file without this error message in your machine. Then post it here. I will check the difference. Thank you.


#11

Hi Laurence,

Here you have the file.


#12

Please try the attached fix.

If the error still occurs, please post the file created with the new dll. And please tell me the result of following code:

CultureInfo culture = CultureInfo.CurrentCulture;
Console.WriteLine(culture.ThreeLetterISOLanguageName);


Thank you.


#13

Sorry, wrong version. Try this one, please.


#14

Hi Laurence,

It works!!,

Thank you.