Problems with FirstPageNumber property

Last post 03-13-2012, 9:03 AM by aspose.notifier. 6 replies.
Sort Posts: Previous Next
  •  02-03-2012, 11:02 AM 359229

    Problems with FirstPageNumber property .NET

    Attachment: Present (inaccessible)
    Hello,
    I'm using Aspose.Cells v7.0.3.0 to generate a report consisting of multiple sub-reports, where each sub-report is on a separate sheet of the workbook.  See attached file PageNumbers.auto.xls for an example.  I would like the page numbers to start after the first sheet, which is a table of contents.  So I'm setting the FirstPageNumber property for each sheet after the first one.  If I do this directly in Excel, I get the results I want.  When I do it through Aspose, the results are not right.

    The XLS result shows the correct page numbers for the third and fourth sheet, but the second sheet shows Auto.  The XLSX shows Auto for all sheets, and the PDF reflects this.  Interestingly, when I load the XLSX back into Aspose, the settings seem to be correct.

    Following is the code I'm using to set the property.  Is there anything additional I need to do to make the page numbers come out the way I want?

    public void TestFirstPageNumber()
    {
        var filename = string.Format(@"{0}PageNumbers\PageNumbers.", TestHelper.InputDirectory);
        var original = new Workbook(filename + "auto.xls");

        Assert.That(original.Worksheets.Count, Is.EqualTo(4));

        //Assert.That(original.Worksheets[1].PageSetup.FirstPageNumber, Is.Not.EqualTo(1)); //fails - is there no difference between 1 and Auto?
        Assert.That(original.Worksheets[2].PageSetup.FirstPageNumber, Is.Not.EqualTo(2));
        Assert.That(original.Worksheets[3].PageSetup.FirstPageNumber, Is.Not.EqualTo(4));

        original.Worksheets[1].PageSetup.FirstPageNumber = 1;
        original.Worksheets[2].PageSetup.FirstPageNumber = 2;
        original.Worksheets[3].PageSetup.FirstPageNumber = 4;

        original.Save(filename + "new.xls");
        original.Save(filename + "new.xlsx");
        original.Save(filename + "new.pdf");

        var copy = new Workbook(filename + "new.xlsx");
        Assert.That(copy.Worksheets[1].PageSetup.FirstPageNumber, Is.EqualTo(1));
        Assert.That(copy.Worksheets[2].PageSetup.FirstPageNumber, Is.EqualTo(2));
        Assert.That(copy.Worksheets[3].PageSetup.FirstPageNumber, Is.EqualTo(4));
    }

     
  •  02-03-2012, 11:46 AM 359235 in reply to 359229

    Re: Problems with FirstPageNumber property

    Hi,

    I can find the issue as you have mentioned by running your sample code with your template file. I got issues especially for the output XLSX and PDF files. I have logged a ticket with an id: CELLSNET-40345. We will look into it soon.

    Thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  02-10-2012, 3:14 AM 360590 in reply to 359229

    Re: Problems with FirstPageNumber property

    Hi,

    Please download and try this fix: Aspose.Cells for .NET v7.1.0.6


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  02-10-2012, 11:31 AM 360803 in reply to 360590

    Re: Problems with FirstPageNumber property .NET

    I tried the 7.1.0.6 update, but I am seeing exactly the same results for the same code.  The first sheet/page after the table of contents ("First Report") shows a page number of 2, even though my code has told this sheet to use 1 as its first page number.  In the XLSX and PDF versions, all subsequent sheets also show wrong page numbers.

    Is there anything I need to do differently in my code to make the page numbers show what I want?

    Mishelle
     
  •  02-12-2012, 8:35 PM 360914 in reply to 360803

    Re: Problems with FirstPageNumber property

    Hi,

    Thanks for your feedback.

    I have reopened this issue and added your feedback inside it. We will look into it and fix the problems asap.

    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  03-08-2012, 3:27 AM 366684 in reply to 359229

    Re: Problems with FirstPageNumber property

    Hi,

    We have fixed this issue. Please download: Aspose.Cells for .NET v7.1.1.6


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  03-13-2012, 9:03 AM 367771 in reply to 359229

    Re: Problems with FirstPageNumber property

    The issues you have found earlier (filed as CELLSNET-40345) have been fixed in this update.


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
     
View as RSS news feed in XML