Files
DP44/Common/DTS.Common.SerializationPlus/XLSX/Excel.File.cs

78 lines
2.0 KiB
C#
Raw Normal View History

2026-04-17 14:55:32 -04:00
/*
* Excel.File.cs
*
* Copyright © 2017
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
namespace DTS.Serialization.XLSX
{
/// <summary>
/// implementation of the Serialization.File class for XLSX
/// http://fogbugz/fogbugz/default.asp?9920'
/// right now this will only export EU, (filtered or unfiltered)
/// but we'll likely want to control whether to export mV/ADC in future
/// </summary>
public partial class File
: Serialization.File, IWritable<Test>
{
/// <summary>
/// constructor
/// </summary>
public File()
: base("XLSX")
{
}
/// <summary>
/// Get the file writer for this file type.
/// </summary>
public IWriter<Test> Exporter
{
get
{
try
{
if (_exporter == null)
{
var writer = new Writer(this, DefaultEncoding);
_exporter = writer;
}
return _exporter;
}
catch (System.Exception ex)
{
throw new Exception("encountered problem getting exporter", ex);
}
}
}
private IWriter<Test> _exporter;
/// <summary>
/// Controls whether to export ADC or not
/// </summary>
public bool ExportADC
{
set => ((Writer)Exporter).ExportADC = value;
}
/// <summary>
/// Controls whether to export EU or not
/// </summary>
public bool ExportEU
{
set => ((Writer)Exporter).ExportEU = value;
}
/// <summary>
/// Controls whether to export mV or not
/// </summary>
public bool ExportMV
{
set => ((Writer)Exporter).ExportMv = value;
}
}
}