Wordize for .NET è una soluzione professionale per l'automazione dei report e la generazione programmatica di documenti Word. La classe ReportBuilder fornisce agli sviluppatori C# la capacità di creare report Word utilizzando template e sintassi LINQ, il che aiuta ad accelerare i processi di business intelligence, implementare contenuto dinamico nei flussi di lavoro documentali automatizzati.
Funzionalità:LINQ Reporting garantisce la creazione di documenti Word professionali con supporto per formattazione complessa, tabelle e diagrammi. I file Word mantengono la possibilità di modifica successiva, rendendoli ideali per documentazione aziendale, contratti e specifiche tecniche.
Testa le capacità di generazione programmatica di report Word nella demo interattiva online presentata in questa pagina. Per questo, carica un template del documento, file di dati (JSON, XML o CSV), esegui l'operazione e scarica il documento Word generato per verifica. Il frammento di codice C# fornito è completamente pronto per l'uso nel tuo progetto .NET.
using Wordize.Reporting;
var dataSource = new JsonDataSource("data.json");
ReportBuilder.BuildReport("Input.docx", "Output.docx", dataSource, "");
using Wordize.Reporting;
var dataSource = new JsonDataSource("data.json");
ReportBuilder.BuildReport("Input.docx", "Output.docx", dataSource, "");
using Wordize.Reporting;
using Wordize.Saving;
var dataSource = new JsonDataSource("data.json");
var imageStreams = ReportBuilder.BuildReportToImages("Input.docx",
new ImageSaveOptions(SaveFormat.Docx), new[] { dataSource }, new[] { "" });
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}.docx");
stream.CopyTo(file);
}
using Wordize.Reporting;
var dataSource = new XmlDataSource("data.xml");
ReportBuilder.BuildReport("Input.docx", "Output.docx", dataSource, "");
using Wordize.Reporting;
var dataSource = new XmlDataSource("data.xml");
ReportBuilder.BuildReport("Input.docx", "Output.docx", dataSource, "");
using Wordize.Reporting;
using Wordize.Saving;
var dataSource = new XmlDataSource("data.xml");
var imageStreams = ReportBuilder.BuildReportToImages("Input.docx",
new ImageSaveOptions(SaveFormat.Docx), new[] { dataSource }, new[] { "" });
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}.docx");
stream.CopyTo(file);
}
using Wordize.Reporting;
var dataSource = new CsvDataSource("data.csv", new CsvDataLoadOptions() { HasHeaders = true });
ReportBuilder.BuildReport("Input.docx", "Output.docx", dataSource, "");
using Wordize.Reporting;
var dataSource = new CsvDataSource("data.csv", new CsvDataLoadOptions() { HasHeaders = true });
ReportBuilder.BuildReport("Input.docx", "Output.docx", dataSource, "");
using Wordize.Reporting;
using Wordize.Saving;
var dataSource = new CsvDataSource("data.csv", new CsvDataLoadOptions() { HasHeaders = true });
var imageStreams = ReportBuilder.BuildReportToImages("Input.docx",
new ImageSaveOptions(SaveFormat.Docx), new[] { dataSource }, new[] { "" });
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}.docx");
stream.CopyTo(file);
}