How to create table with custom style

how to insert a table and apply a style to it?

just like word default style.

word style

thanks

Hi Pyntia,

Thanks for your inquiry. Here is how you can achieve this:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Table tbl = builder.StartTable();
builder.InsertCell();
builder.Writeln("A cell.");
builder.EndRow();
builder.EndTable();
tbl.StyleIdentifier = StyleIdentifier.TableGrid6;
doc.Save(MyDir + @"out.docx");

Please let me know if I can be of any further assistance.

Best regards,

hi, Awais

it looks very simple, thank you very much