Feedback

on v13.8.0 RowFormat.HeadingFormat = true does not work

Last post 12-09-2013, 10:44 PM by Aspose Notifier. 4 replies.
Sort Posts: Previous Next
  •  10-22-2013, 8:02 AM 503446

    on v13.8.0 RowFormat.HeadingFormat = true does not work .NET

    Attachment: Present (inaccessible)

    Hi,

    I discovered this new issue, so I created the following draft:

    static void Main(string[] args)
    {
    var doc = new Document();
    var db = new DocumentBuilder(doc);
    db.InsertParagraph();
    db.Write("Hello world !");
    db.StartTable();
    WriteHeaderRow(db, "Header 1", "Header 2", "Header 3");
    WriteRow(db, "A1", "A2", "A3");
    WriteRow(db, "B1", "B2", "B3");
    WriteRow(db, "C1", "C2", "C3");
    db.EndTable();
    doc.Save("c:/temp/test-aspose.docx", SaveFormat.Docx);
    }
    static void WriteHeaderRow(DocumentBuilder db, params string[] cells)
    {
    db.RowFormat.HeadingFormat = true;
    WriteRow(db, cells);
    db.RowFormat.HeadingFormat = false;
    }
    static void WriteRow(DocumentBuilder db, params string[] cells)
    {
    foreach (var cell in cells)
    {
    db.InsertCell();
    db.Write(cell);
    }
    db.EndRow();
    }

    The strange thing is that in Microsoft Word 2010: repeat header is active, but it does not work.

    See attached files.

    Best regards

     
  •  10-23-2013, 3:42 AM 503657 in reply to 503446

    Re: on v13.8.0 RowFormat.HeadingFormat = true does not work

    Hi Dimitri,

    Thanks for your inquiry. Please try running the following code to be able to achieve what you're looking for:

    Document doc = new Document();          

    var db = new DocumentBuilder(doc);

    db.InsertParagraph();

    db.Write("Hello world !");

    db.StartTable();

    WriteHeaderRow(db, "Header 1""Header 2""Header 3");

    WriteRow(db, cells: new string[] { "A1""A2""A3" });

    WriteRow(db, cells: new string[] { "B1""B2""B3" });

    WriteRow(db, cells: new string[] { "C1""C2""C3" });

    db.EndTable();

    doc.Save(@"C:\Temp\output.docx");


    static void WriteHeaderRow(DocumentBuilder db, params string[] cells)

    {

        WriteRow(db, true, cells);

    }

    static void WriteRow(DocumentBuilder db, bool isHeaderRow = false, params string[] cells)

    {  

        foreach (var cell in cells)

        {

            db.InsertCell();               

            db.Write(cell);

        }

        db.RowFormat.HeadingFormat = isHeaderRow;

        db.EndRow();

    }


    I hope, this helps.

    Best regards,

    Awais Hafeez
    Support Developer
    Aspose Support Team
    Aspose - Your File Format APIs

    Keep in touch! We're on Twitter and Facebook
     
  •  10-23-2013, 4:10 AM 503673 in reply to 503657

    Re: on v13.8.0 RowFormat.HeadingFormat = true does not work

    Hi,

    I confirm if RowFormat.HeadingFormat is after InsertCell() it works well, I can avoid this problem in my application.
    Any way to fix this in future ?

    Thanks

    Best regards
     
  •  10-23-2013, 11:56 PM 503872 in reply to 503673

    Re: on v13.8.0 RowFormat.HeadingFormat = true does not work

    Hi Dimitri,

    Thanks for your request. I have logged an issue in our issue tracking system. The ID of this issue is WORDSNET-9141. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for any inconvenience.

    Best regards,

    Awais Hafeez
    Support Developer
    Aspose Support Team
    Aspose - Your File Format APIs

    Keep in touch! We're on Twitter and Facebook
     
  •  12-09-2013, 10:44 PM 513139 in reply to 503446

    Re: on v13.8.0 RowFormat.HeadingFormat = true does not work

    The issues you have found earlier (filed as WORDSNET-9141) have been fixed in this .NET update and this Java update.


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