Free Support Forum - aspose.com

Problem with Print_Tiles and Excel french version

Hello,

I'm having problems with the setting PrintTitleRows and Copying sheets. I'm using Aspose.Cells 4.4.3.15
I've 4 workbooks that i merged into one. After i rename the sheets and i set the printTitlesRows.
So when i open this new workbook I've a message :
"Cannot be the same as built-in name.
Old Name: Print_Titles
New Name: "

This message appears only in the excel french version but no in the english version.
My code is :

Private Sub GenerateReport(ByVal Streams() As Stream)

Dim main As Aspose.Cells.Workbook = Nothing

For i = 0 To UBound(Streams)

Dim wbk As New Aspose.Cells.Workbook

wbk.Open(Streams(i))

Dim index As Integer

If i = 0 Then

main = wbk

index = 0

Else

index = main.Worksheets.Add(Aspose.Cells.SheetType.Worksheet)

main.Worksheets(index).Copy(wbk.Worksheets(0))

End If

main.Worksheets(index).Name = Choose(CDbl(i + 1), "Master", "Design", "Permits", "Procurements", "Construction")

wbk = Nothing

Next

Dim pageSetup As Aspose.Cells.PageSetup

For Each wks As Aspose.Cells.Worksheet In main.Worksheets

wks.AutoFilter.SetRange(2, 0, wks.Cells.Columns.Count - 1)

pageSetup = wks.PageSetup

With pageSetup

.PaperSize = Aspose.Cells.PaperSizeType.PaperA3

.Orientation = Aspose.Cells.PageOrientationType.Landscape

.CenterHorizontally = True

.PrintTitleRows = "$1:$3"

End With

Next

main.Save("Report_" & Now.ToString("yyMMddhhmmss") & ".xls", Aspose.Cells.FileFormatType.Excel2000, Aspose.Cells.SaveType.OpenInExcel, Response)

End Sub

How to fix this problem?

Thanks,

Angélique

Hi,

Could you try the attached version.

If you still find the problem, kindly post you template file(s) here to show the issue, we will check it soon.

Thank you.

Sorry but i 've a problem when i extract your attach file. I 've the message : "Error reading file"

Could you attach an another file ?

Thank

Angélique

Hi,

Could you try the fix (4.5.0.3) posted in the thread: http://www.aspose.com/community/forums/thread/134097/support-for-replace-function-in-.net.aspx

Thank you.

Hi,

Please call Worksheets.SortNames before saving the file. See following codes:

workbook.Worksheets.SortNames();

workbook.Save(@"C:\book1.xls");