Wordize Reporting สำหรับ .NET — โซลูชันนวัตกรรมสำหรับการสร้างเอกสาร Word แบบโปรแกรมที่ช่วยให้นักพัฒนา C# สามารถอัตโนมัติกระบวนการสร้างรายงานที่มีความซับซ้อนทุกระดับ ผสานการสร้างรายงานเข้ากับโปรเจกต์ C# ของคุณและแปลงไฟล์ JSON, XML ให้เป็นเอกสาร Word ระดับมืออาชีพ
ประโยชน์หลักของการสร้างรายงาน Word ใน C#:
เพื่อเข้าใจวิธีการสร้างไฟล์ Word ใน C# โดยใช้ API การสร้างเอกสาร อัปโหลดเอกสารเทมเพลตและไฟล์ข้อมูล (XML, JSON, CSV) ผ่านแบบฟอร์ม ระบุชื่อออบเจกต์แหล่งข้อมูลที่ใช้ในเทมเพลต และเริ่มการสร้างไฟล์ Word แบบโปรแกรม หลังจากรันเดโม ดาวน์โหลดเอกสาร Word ที่สร้างขึ้นและตรวจสอบการแทนที่ข้อมูลที่ถูกต้องจากไฟล์ต้นฉบับที่ระบุ
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);
}
ผลิตภัณฑ์ของเราสามารถข้ามแพลตฟอร์มได้อย่างสมบูรณ์และรองรับการใช้งาน .NET หลักๆ ทั้งหมด:
ตราบใดที่โค้ด .NET ไม่ได้ขึ้นอยู่กับฮาร์ดแวร์หรือระบบปฏิบัติการพื้นฐาน แต่เฉพาะบน Virtual Machine เท่านั้น คุณมีอิสระที่จะพัฒนาซอฟต์แวร์ทุกประเภทสำหรับ Windows, macOS, Android, iOS และ Linux เพียงตรวจสอบให้แน่ใจว่าคุณได้ติดตั้ง .NET Framework, .NET Core, Windows Azure, Mono หรือ Xamarin เวอร์ชันที่เกี่ยวข้อง
เราขอแนะนำให้ใช้ Microsoft Visual Studio, Xamarin และ MonoDevelop สภาพแวดล้อมการพัฒนาแบบรวมเพื่อสร้างแอปพลิเคชัน C#, F#, VB.NET