C# 클래스 TemplNET.TemplDoc

Represents an instance of a document
파일 보기 프로젝트 열기: CPonty/templ-dot-net 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Docx Novacode.DocX
Stream System.IO.MemoryStream

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
CellClear ( Cell cell, bool deleteAllParagraphs = false ) : void

Clear text and images from all paragraphs in cell. Optional: Delete all paragraph objects. Keep in mind, cells with zero paragraphs are considered malformed by Word! Also keep in mind, you will lose formatting info (e.g. font). Special cases of content other than text or images may not be removed; If this becomes a problem, we can develop it.

CellCopyContents ( Cell srcCell, Cell dstCell ) : void

Copy (text) contents of srcCell into dstCell. Clears text of dstCell plus all but first paragraph instance before copying.

CellCopyProperties ( Cell fromCell, Cell toCell ) : void
Commit ( ) : TemplDoc

Save to internal memory. Initialising a *new* stream is important due to the internal structure of DocX's load/save.

Copy ( ) : TemplDoc

Clone

Paragraphs ( DocX doc ) : IEnumerable

Retrieves all paragraph references from the document body, header, footer, and table content.

SaveAs ( string fileName ) : void

Save to disk. Supplied file name is sanitized and converted to '.zip'

TemplDoc ( DocX document ) : System.Collections.Generic

Start with passed-in doc

TemplDoc ( Stream stream ) : System.Collections.Generic

New document from data stream

TemplDoc ( byte data ) : System.Collections.Generic

New document from file data

TemplDoc ( string filename ) : System.Collections.Generic

New document from filename

메소드 상세

CellClear() 공개 정적인 메소드

Clear text and images from all paragraphs in cell. Optional: Delete all paragraph objects. Keep in mind, cells with zero paragraphs are considered malformed by Word! Also keep in mind, you will lose formatting info (e.g. font). Special cases of content other than text or images may not be removed; If this becomes a problem, we can develop it.
public static CellClear ( Cell cell, bool deleteAllParagraphs = false ) : void
cell Novacode.Cell
deleteAllParagraphs bool
리턴 void

CellCopyContents() 공개 정적인 메소드

Copy (text) contents of srcCell into dstCell. Clears text of dstCell plus all but first paragraph instance before copying.
public static CellCopyContents ( Cell srcCell, Cell dstCell ) : void
srcCell Novacode.Cell
dstCell Novacode.Cell
리턴 void

CellCopyProperties() 공개 정적인 메소드

public static CellCopyProperties ( Cell fromCell, Cell toCell ) : void
fromCell Novacode.Cell
toCell Novacode.Cell
리턴 void

Commit() 공개 메소드

Save to internal memory. Initialising a *new* stream is important due to the internal structure of DocX's load/save.
public Commit ( ) : TemplDoc
리턴 TemplDoc

Copy() 공개 메소드

Clone
public Copy ( ) : TemplDoc
리턴 TemplDoc

Paragraphs() 공개 정적인 메소드

Retrieves all paragraph references from the document body, header, footer, and table content.
public static Paragraphs ( DocX doc ) : IEnumerable
doc Novacode.DocX
리턴 IEnumerable

SaveAs() 공개 메소드

Save to disk. Supplied file name is sanitized and converted to '.zip'
public SaveAs ( string fileName ) : void
fileName string
리턴 void

TemplDoc() 공개 메소드

Start with passed-in doc
public TemplDoc ( DocX document ) : System.Collections.Generic
document Novacode.DocX
리턴 System.Collections.Generic

TemplDoc() 공개 메소드

New document from data stream
public TemplDoc ( Stream stream ) : System.Collections.Generic
stream System.IO.Stream
리턴 System.Collections.Generic

TemplDoc() 공개 메소드

New document from file data
public TemplDoc ( byte data ) : System.Collections.Generic
data byte
리턴 System.Collections.Generic

TemplDoc() 공개 메소드

New document from filename
public TemplDoc ( string filename ) : System.Collections.Generic
filename string
리턴 System.Collections.Generic

프로퍼티 상세

Docx 공개적으로 프로퍼티

Underlying DocX document instance
public DocX,Novacode Docx
리턴 Novacode.DocX

Stream 공개적으로 프로퍼티

Document as memory stream. Automatically updates from the underlying DocX document on Commit(), SaveAs(), Copy()
public MemoryStream,System.IO Stream
리턴 System.IO.MemoryStream