Table formatting issue

Hi,

I am trying to remove borders from a table I’m creating, here is my example:

var table = builder.StartTable();
table.ClearBorders();

builder.InsertCell();
builder.Writeln("test");

builder.EndRow();
builder.EndTable();

There is still a 1px border around the table. What am I doing wrong? Thanks in advance.

Hi Andrew,

Thanks for your inquiry. Please use the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
var table = builder.StartTable();
builder.InsertCell();
builder.Writeln("test");
builder.EndRow();
builder.EndTable();
// Call this method after when Table creation is done 
table.ClearBorders();
doc.Save(MyDir + @"16.1.0.docx");

Hope, this helps.

Best regards,