AODL.Document.SpreadsheetDocuments.SpreadsheetDocument.New C# (CSharp) Метод

New() публичный Метод

Create a new blank spreadsheet document.
public New ( ) : void
Результат void
		public void New()
		{
			this.LoadBlankContent();

			this.NamespaceManager			= TextDocumentHelper.NameSpace(this._xmldoc.NameTable);

			this.DocumentConfigurations2	= new DocumentConfiguration2();

			this.DocumentManifest			= new DocumentManifest();
			this.DocumentManifest.New();

			this.DocumentMetadata			= new DocumentMetadata(this);
			this.DocumentMetadata.New();

			this.DocumentPictures			= new DocumentPictureCollection();

			this.DocumentSetting			= new DocumentSetting();
			this.DocumentSetting.New();

			this.DocumentStyles				= new DocumentStyles();
			this.DocumentStyles.New();
			this.ReadCommonStyles();

			this.DocumentThumbnails			= new DocumentPictureCollection();
			
		}

Usage Example

Пример #1
0
 public void CreateSimpleTable()
 {
     //Create new spreadsheet document
     SpreadsheetDocument spreadsheetDocument		= new SpreadsheetDocument();
     spreadsheetDocument.New();
     //Create a new table
     Table table					= new Table(spreadsheetDocument, "First", "tablefirst");
     //Create a new cell, without any extra styles
     Cell cell								= table.CreateCell("cell001");
     cell.OfficeValueType					= "string";
     //Set full border
     cell.CellStyle.CellProperties.Border	= Border.NormalSolid;
     //Add a paragraph to this cell
     Paragraph paragraph						= ParagraphBuilder.CreateSpreadsheetParagraph(
         spreadsheetDocument);
     //Add some text content
     paragraph.TextContent.Add(new SimpleText(spreadsheetDocument, "Some text"));
     //Add paragraph to the cell
     cell.Content.Add(paragraph);
     //Insert the cell at row index 2 and column index 3
     //All need rows, columns and cells below the given
     //indexes will be build automatically.
     table.InsertCellAt(2, 3, cell);
     //Insert table into the spreadsheet document
     spreadsheetDocument.TableCollection.Add(table);
     spreadsheetDocument.SaveTo(AARunMeFirstAndOnce.outPutFolder+"simple.ods");
 }
All Usage Examples Of AODL.Document.SpreadsheetDocuments.SpreadsheetDocument::New