C# 클래스 Novacode.Table

Represents a Table in a document.
상속: InsertBeforeOrAfter
파일 보기 프로젝트 열기: WordDocX/DocX 1 사용 예제들

공개 메소드들

메소드 설명
DeleteAndShiftCellsLeft ( int rowIndex, int celIndex ) : void

Deletes a cell in a row

GetBorder ( TableBorderType borderType ) : Novacode.Border

Get a table border Added by lckuiper @ 20101117

GetColumnWidth ( Int32 index ) : Double

Gets the column width for a given column index.

InsertColumn ( ) : void

Insert a column to the right of a Table.

InsertColumn ( int index, bool direction ) : void

Insert a column into a table.

InsertPageBreakAfterSelf ( ) : void

Insert a page break after a Table.

InsertPageBreakBeforeSelf ( ) : void

Insert a page break before a Table.

InsertParagraphAfterSelf ( Paragraph p ) : Paragraph

Insert a Paragraph after this Table, this Paragraph may have come from the same or another document.

InsertParagraphAfterSelf ( string text ) : Paragraph

Insert a new Paragraph after this Table.

InsertParagraphAfterSelf ( string text, bool trackChanges ) : Paragraph

Insert a new Paragraph after this Table.

InsertParagraphAfterSelf ( string text, bool trackChanges, Formatting formatting ) : Paragraph

Insert a new Paragraph after this Table.

InsertParagraphBeforeSelf ( Paragraph p ) : Paragraph

Insert a Paragraph before this Table, this Paragraph may have come from the same or another document.

InsertParagraphBeforeSelf ( string text ) : Paragraph

Insert a new Paragraph before this Table.

InsertParagraphBeforeSelf ( string text, bool trackChanges ) : Paragraph

Insert a new Paragraph before this Table.

InsertParagraphBeforeSelf ( string text, bool trackChanges, Formatting formatting ) : Paragraph

Insert a new Paragraph before this Table.

InsertRow ( ) : Row

Insert a row at the end of this table.

InsertRow ( Row row ) : Row

Insert a copy of a row at the end of this table.

InsertRow ( Row row, int index ) : Row

Insert a copy of a row into this table.

InsertRow ( int index ) : Row

Insert a row into this table.

InsertTableAfterSelf ( Table t ) : Table

Insert a new Table after this Table, this Table can be from this document or another document.

InsertTableAfterSelf ( int rowCount, int columnCount ) : Table

Insert a new Table into this document after this Table.

InsertTableBeforeSelf ( Table t ) : Table

Insert a new Table before this Table, this Table can be from this document or another document.

InsertTableBeforeSelf ( int rowCount, int columnCount ) : Table

Insert a new Table into this document before this Table.

MergeCellsInColumn ( int columnIndex, int startRow, int endRow ) : void

Merge cells in given column starting with startRow and ending with endRow.

Added by arudoy patch: 11608

Remove ( ) : void

Remove this Table from this document.

RemoveColumn ( ) : void

Remove the last column for this Table.

RemoveColumn ( int index ) : void

Remove a column from this Table.

RemoveRow ( ) : void

Remove the last row from this Table.

RemoveRow ( int index ) : void

Remove a row from this Table.

SetBorder ( TableBorderType borderType, Novacode.Border border ) : void

Set a table border Added by lckuiper @ 20101117

SetColumnWidth ( Int32 index, Double width ) : void

Sets the column width for the given index.

SetDirection ( Direction direction ) : void

Set the direction of all content in this Table.

SetTableCellMargin ( TableCellMarginType type, double margin ) : void

Set the specified cell margin for the table-level.

More information can be found here

SetWidths ( float widths ) : void
SetWidthsPercentage ( float widthsPercentage, float totalWidth ) : void

Set Table column width by prescribing percent

비공개 메소드들

메소드 설명
AddCellToRow ( Row row, System.Xml.Linq.XElement cell, int index, bool direction ) : void

Adds a cell to the right or left of a cell

GetOrCreate_tblPr ( ) : System.Xml.Linq.XElement

If the tblPr element doesent exist it is created, either way it is returned by this function.

InsertRow ( List content, Int32 index ) : Row
Table ( DocX document, System.Xml.Linq.XElement xml ) : System

메소드 상세

DeleteAndShiftCellsLeft() 공개 메소드

Deletes a cell in a row
public DeleteAndShiftCellsLeft ( int rowIndex, int celIndex ) : void
rowIndex int index of the row you want to remove the cell
celIndex int index of the cell you want to remove
리턴 void

GetBorder() 공개 메소드

Get a table border Added by lckuiper @ 20101117
public GetBorder ( TableBorderType borderType ) : Novacode.Border
borderType TableBorderType The table border to get
리턴 Novacode.Border

GetColumnWidth() 공개 메소드

Gets the column width for a given column index.
public GetColumnWidth ( Int32 index ) : Double
index System.Int32
리턴 Double

InsertColumn() 공개 메소드

Insert a column to the right of a Table.
public InsertColumn ( ) : void
리턴 void

InsertColumn() 공개 메소드

Insert a column into a table.
public InsertColumn ( int index, bool direction ) : void
index int The index to insert the column at.
direction bool The side in which you wish to place the colum(True right, false left)
리턴 void

InsertPageBreakAfterSelf() 공개 메소드

Insert a page break after a Table.
public InsertPageBreakAfterSelf ( ) : void
리턴 void

InsertPageBreakBeforeSelf() 공개 메소드

Insert a page break before a Table.
public InsertPageBreakBeforeSelf ( ) : void
리턴 void

InsertParagraphAfterSelf() 공개 메소드

Insert a Paragraph after this Table, this Paragraph may have come from the same or another document.
public InsertParagraphAfterSelf ( Paragraph p ) : Paragraph
p Paragraph The Paragraph to insert.
리턴 Paragraph

InsertParagraphAfterSelf() 공개 메소드

Insert a new Paragraph after this Table.
public InsertParagraphAfterSelf ( string text ) : Paragraph
text string The initial text for this new Paragraph.
리턴 Paragraph

InsertParagraphAfterSelf() 공개 메소드

Insert a new Paragraph after this Table.
public InsertParagraphAfterSelf ( string text, bool trackChanges ) : Paragraph
text string The initial text for this new Paragraph.
trackChanges bool Should this insertion be tracked as a change?
리턴 Paragraph

InsertParagraphAfterSelf() 공개 메소드

Insert a new Paragraph after this Table.
public InsertParagraphAfterSelf ( string text, bool trackChanges, Formatting formatting ) : Paragraph
text string The initial text for this new Paragraph.
trackChanges bool Should this insertion be tracked as a change?
formatting Formatting The formatting to apply to this insertion.
리턴 Paragraph

InsertParagraphBeforeSelf() 공개 메소드

Insert a Paragraph before this Table, this Paragraph may have come from the same or another document.
public InsertParagraphBeforeSelf ( Paragraph p ) : Paragraph
p Paragraph The Paragraph to insert.
리턴 Paragraph

InsertParagraphBeforeSelf() 공개 메소드

Insert a new Paragraph before this Table.
public InsertParagraphBeforeSelf ( string text ) : Paragraph
text string The initial text for this new Paragraph.
리턴 Paragraph

InsertParagraphBeforeSelf() 공개 메소드

Insert a new Paragraph before this Table.
public InsertParagraphBeforeSelf ( string text, bool trackChanges ) : Paragraph
text string The initial text for this new Paragraph.
trackChanges bool Should this insertion be tracked as a change?
리턴 Paragraph

InsertParagraphBeforeSelf() 공개 메소드

Insert a new Paragraph before this Table.
public InsertParagraphBeforeSelf ( string text, bool trackChanges, Formatting formatting ) : Paragraph
text string The initial text for this new Paragraph.
trackChanges bool Should this insertion be tracked as a change?
formatting Formatting The formatting to apply to this insertion.
리턴 Paragraph

InsertRow() 공개 메소드

Insert a row at the end of this table.
public InsertRow ( ) : Row
리턴 Row

InsertRow() 공개 메소드

Insert a copy of a row at the end of this table.
public InsertRow ( Row row ) : Row
row Row
리턴 Row

InsertRow() 공개 메소드

Insert a copy of a row into this table.
public InsertRow ( Row row, int index ) : Row
row Row Row to copy and insert.
index int Index to insert row at.
리턴 Row

InsertRow() 공개 메소드

Insert a row into this table.
public InsertRow ( int index ) : Row
index int Index to insert row at.
리턴 Row

InsertTableAfterSelf() 공개 메소드

Insert a new Table after this Table, this Table can be from this document or another document.
public InsertTableAfterSelf ( Table t ) : Table
t Table The Table t to be inserted
리턴 Table

InsertTableAfterSelf() 공개 메소드

Insert a new Table into this document after this Table.
public InsertTableAfterSelf ( int rowCount, int columnCount ) : Table
rowCount int The number of rows this Table should have.
columnCount int The number of columns this Table should have.
리턴 Table

InsertTableBeforeSelf() 공개 메소드

Insert a new Table before this Table, this Table can be from this document or another document.
public InsertTableBeforeSelf ( Table t ) : Table
t Table The Table t to be inserted
리턴 Table

InsertTableBeforeSelf() 공개 메소드

Insert a new Table into this document before this Table.
public InsertTableBeforeSelf ( int rowCount, int columnCount ) : Table
rowCount int The number of rows this Table should have.
columnCount int The number of columns this Table should have.
리턴 Table

MergeCellsInColumn() 공개 메소드

Merge cells in given column starting with startRow and ending with endRow.
Added by arudoy patch: 11608
public MergeCellsInColumn ( int columnIndex, int startRow, int endRow ) : void
columnIndex int
startRow int
endRow int
리턴 void

Remove() 공개 메소드

Remove this Table from this document.
public Remove ( ) : void
리턴 void

RemoveColumn() 공개 메소드

Remove the last column for this Table.
public RemoveColumn ( ) : void
리턴 void

RemoveColumn() 공개 메소드

Remove a column from this Table.
public RemoveColumn ( int index ) : void
index int The column to remove.
리턴 void

RemoveRow() 공개 메소드

Remove the last row from this Table.
public RemoveRow ( ) : void
리턴 void

RemoveRow() 공개 메소드

Remove a row from this Table.
public RemoveRow ( int index ) : void
index int The row to remove.
리턴 void

SetBorder() 공개 메소드

Set a table border Added by lckuiper @ 20101117
public SetBorder ( TableBorderType borderType, Novacode.Border border ) : void
borderType TableBorderType The table border to set
border Novacode.Border Border object to set the table border
리턴 void

SetColumnWidth() 공개 메소드

Sets the column width for the given index.
public SetColumnWidth ( Int32 index, Double width ) : void
index System.Int32 Column index
width Double Colum width
리턴 void

SetDirection() 공개 메소드

Set the direction of all content in this Table.
public SetDirection ( Direction direction ) : void
direction Direction (Left to Right) or (Right to Left)
리턴 void

SetTableCellMargin() 공개 메소드

Set the specified cell margin for the table-level.
More information can be found here
public SetTableCellMargin ( TableCellMarginType type, double margin ) : void
type TableCellMarginType The side of the cell margin.
margin double The value for the specified cell margin.
리턴 void

SetWidths() 공개 메소드

public SetWidths ( float widths ) : void
widths float
리턴 void

SetWidthsPercentage() 공개 메소드

Set Table column width by prescribing percent
public SetWidthsPercentage ( float widthsPercentage, float totalWidth ) : void
widthsPercentage float column width % list
totalWidth float Total table width. Will be calculated if null sent.
리턴 void