Wordize for .NET is a professional solution for automated reporting and programmatic document generation. The ReportBuilder class provides C# developers with the capability to create reports using templates and LINQ syntax, which helps accelerate business intelligence processes, implement dynamic content in automated document workflows.
Key Features:Test the capabilities of programmatic report generation in the interactive online demo presented on this page. To do this, upload a document template, data file (JSON, XML or CSV), run the operation and download the generated document for verification. The provided C# code snippet is fully ready for use in your .NET project.
using Wordize.Reporting;
var dataSource = new JsonDataSource("data.json");
ReportBuilder.BuildReport("Input.docx", "Output.pdf", dataSource, "");
using Wordize.Reporting;
var dataSource = new JsonDataSource("{{input2}}");
ReportBuilder.BuildReport("{{input1}}", "{{output}}", dataSource, "{{text1}}");
using Wordize.Reporting;
using Wordize.Saving;
var dataSource = new JsonDataSource("{{input2}}");
var imageStreams = ReportBuilder.BuildReportToImages("{{input1}}",
new ImageSaveOptions(SaveFormat.{{saveFormat}}), new[] { dataSource }, new[] { "{{text1}}" });
foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i)))
{
using var _ = stream;
stream.Position = 0;
using var file = File.Create($"Output_{page + 1}.{{outputExt}}");
stream.CopyTo(file);
}
using Wordize.Reporting;
var dataSource = new XmlDataSource("data.json");
ReportBuilder.BuildReport("Input.docx", "Output.pdf", dataSource, "");
using Wordize.Reporting;
var dataSource = new XmlDataSource("{{input2}}");
ReportBuilder.BuildReport("{{input1}}", "{{output}}", dataSource, "{{text1}}");
using Wordize.Reporting;
using Wordize.Saving;
var dataSource = new XmlDataSource("{{input2}}");
var imageStreams = ReportBuilder.BuildReportToImages("{{input1}}",
new ImageSaveOptions(SaveFormat.{{saveFormat}}), new[] { dataSource }, new[] { "{{text1}}" });
foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i)))
{
using var _ = stream;
stream.Position = 0;
using var file = File.Create($"Output_{page + 1}.{{outputExt}}");
stream.CopyTo(file);
}
using Wordize.Reporting;
var dataSource = new CsvDataSource("data.json", new CsvDataLoadOptions() { HasHeaders = true });
ReportBuilder.BuildReport("Input.docx", "Output.pdf", dataSource, "");
using Wordize.Reporting;
var dataSource = new CsvDataSource("{{input2}}", new CsvDataLoadOptions() { HasHeaders = true });
ReportBuilder.BuildReport("{{input1}}", "{{output}}", dataSource, "{{text1}}");
using Wordize.Reporting;
using Wordize.Saving;
var dataSource = new CsvDataSource("{{input2}}", new CsvDataLoadOptions() { HasHeaders = true });
var imageStreams = ReportBuilder.BuildReportToImages("{{input1}}",
new ImageSaveOptions(SaveFormat.{{saveFormat}}), new[] { dataSource }, new[] { "{{text1}}" });
foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i)))
{
using var _ = stream;
stream.Position = 0;
using var file = File.Create($"Output_{page + 1}.{{outputExt}}");
stream.CopyTo(file);
}