Files
XplorePlane/XP.ReportEngine/Models/ReportGenerationOptions.cs
T
QI Mingxuan d72b583319 [XP.ReportEngine] 新增 TXT/CSV/Excel 三种报告输出格式支持;Excel (.xlsx) 报告生成器,基于 ClosedXML,支持结构化生成和模板填充两种模式; 新增 XplorePlane_ReportTemplate.xlsx:Excel 报告模板文件。
[XP.ReportEngine] 模型与配置扩展:ReportOutputFormat 枚举:新增 Excel=1, Csv=2, Txt=3(显式序号,向后兼容);新增多格式相关配置加载。
2026-07-01 11:31:41 +08:00

47 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace XP.ReportEngine.Models
{
/// <summary>
/// 报告生成选项 | Report generation options
/// </summary>
public class ReportGenerationOptions
{
/// <summary>
/// 模板文件路径 | Template file path
/// </summary>
public string TemplatePath { get; set; }
/// <summary>
/// 输出文件路径(可选,为 null 时仅返回 MemoryStream| Output file path (optional)
/// </summary>
public string OutputFilePath { get; set; }
/// <summary>
/// 输出格式 | Output format
/// </summary>
public ReportOutputFormat Format { get; set; } = ReportOutputFormat.Pdf;
}
/// <summary>
/// 报告输出格式 | Report output format
/// 说明:显式标注枚举序号,防止未来插入新值时导致原有值序号漂移,
/// 从而保持序列化/路由的向后兼容性。
/// Note: enum values are explicitly numbered to prevent ordinal drift when
/// new values are inserted in the future, preserving backward compatibility
/// for serialization/routing.
/// </summary>
public enum ReportOutputFormat
{
/// <summary>PDF 格式 | PDF format</summary>
Pdf = 0,
/// <summary>Excel.xlsx)格式 | Excel (.xlsx) format</summary>
Excel = 1,
/// <summary>CSV(逗号分隔值)格式 | CSV (comma-separated values) format</summary>
Csv = 2,
/// <summary>TXT(纯文本)格式 | TXT (plain text) format</summary>
Txt = 3
}
}