Last active
October 23, 2019 08:45
-
-
Save GroupDocsGists/f5d3a066b030236218a3564f8c3c014b to your computer and use it in GitHub Desktop.
GroupDocs.Assembly for .NET 19.10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string template_doc_path = "template.docx"; | |
string report_doc_path = "report.docx" | |
CsvDataSource dataSource = new CsvDataSource("datasource.csv"); | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.AssembleDocument(template_doc_path, report_doc_path, new DataSourceInfo(dataSource, "persons")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document doc = ... // Loading a template document. | |
CsvDataSource dataSource = ... // Loading CSV. | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.assembleDocument(doc, dataSource, "persons"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string template_doc_path = "template.docx"; | |
string report_doc_path = "report.docx" | |
CsvDataLoadOptions options = new CsvDataLoadOptions(true); | |
CsvDataSource dataSource = new CsvDataSource("datasource.csv", options); | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.AssembleDocument(template_doc_path, report_doc_path, new DataSourceInfo(dataSource, "persons")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document doc = ... // Loading a template document. | |
CsvDataLoadOptions options = new CsvDataLoadOptions(true); | |
CsvDataSource dataSource = new CsvDataSource(..., options); // Loading CSV. | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.assembleDocument(doc, dataSource, "persons"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string template_doc_path = "template.docx"; | |
string report_doc_path = "report.docx" | |
JsonDataSource dataSource = new JsonDataSource("datasouce.json"); | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.AssembleDocument(template_doc_path, report_doc_path, new DataSourceInfo(dataSource, "persons")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string template_doc_path = "template.docx"; | |
string report_doc_path = "report.docx" | |
JsonDataSource dataSource = new JsonDataSource("datasouce.json"); | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.AssembleDocument(template_doc_path, report_doc_path, new DataSourceInfo(dataSource)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string template_doc_path = "template.docx"; | |
string report_doc_path = "report.docx" | |
XmlDataSource dataSource = new XmlDataSource("datasource.xml"); | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.AssembleDocument(template_doc_path, report_doc_path, new DataSourceInfo(dataSource, "persons")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document doc = ... // Loading a template document. | |
XmlDataSource dataSource = ... // Loading XML (without schema). | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.assembleDocument(doc, dataSource, "persons"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string template_doc_path = "template.docx"; | |
string report_doc_path = "report.docx" | |
XmlDataSource dataSource = new XmlDataSource("datasource.xml"); | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.AssembleDocument(template_doc_path, report_doc_path, new DataSourceInfo(dataSource)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document doc = ... // Loading a template document. | |
XmlDataSource dataSource = ... // Loading XML. | |
DocumentAssembler assembler = new DocumentAssembler(); | |
assembler.assembleDocument(doc, dataSource); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment