I am using TTMSFNCWXDocx to create a Word document.
I am using the code below to include a table in the document, but the table borders are not drawn.
procedure TForm_HandsOnTMSFNCWXDocxTableWithBorder.btnCreateWordDocWithTableClick(Sender: TObject);
var
docX : TTMSFNCWXDocx;
aDoc : TTMSFNCWXDocXDocument;
aSection : TTMSFNCWXDocxSection;
aTable: TTMSFNCWXDocxTable;
aRow : TTMSFNCWXDocxTableRow;
aCell : TTMSFNCWXDocxTableCell;
aPara : TTMSFNCWXDocxParagraph;
aText : TTMSFNCWXDocxText;
i : integer;
begin
docX := self.TMSFNCWXDocx1;
aDoc := docX.Document;
aSection := aDoc.AddSection;
aTable := aSection.AddTable;
for i := 1 to 3 do begin // add 1cel x 3 rows, ;
aRow := aTable.addRow;
aCell := aRow.AddCell;
aPara := aCell.AddParagraph;
aText := aPara.AddText;
aText.text := 'Hello World. (row#='+i.ToString+')';
end;
docX.getDocxAsFile('a.docx');
end;
The screenshot of the created Word document is below.
The resulting Word file is also attached.
a.zip (5.7 KB)
Please tell me how to draw table borders.
(If there is a manual, please let me know.)
Best Regards,