using System;
using System.Collections.Generic;
using System.Text;
namespace HH.WMS.Utils.ExcelLibrary.SpreadSheet
{
public class CellFormat
{
private CellFormatType formatType;
private string formatString;
public CellFormat(CellFormatType type, string fmt)
{
formatType = type;
formatString = fmt;
}
public CellFormatType FormatType
{
get { return formatType; }
}
public string FormatString
{
get { return formatString; }
set { formatString = value; }
}
///
/// Default Format.
///
public static readonly CellFormat General = new CellFormat(CellFormatType.General, "General");
///
/// Format the DateTime with: "YYYY-MM-DD" e.g: 2009-02-18
///
public static readonly CellFormat Date = new CellFormat(CellFormatType.Date, @"YYYY\-MM\-DD");
///
/// Format the DateTime with: "HH:mm:ss" e.g: 14:45:00
///
/// Format the DateTime with: "HH:mm:ss" e.g: 14:45:00
public static readonly CellFormat Time = new CellFormat(CellFormatType.Time, "HH:mm:ss");
///
/// Format the number with: "#,###.00000" e.g: 100.12345
///
/// Format the number with: "#,###.00000" e.g: 100.12345
public static readonly CellFormat Engineer = new CellFormat(CellFormatType.Scientific, "#,###.00000");
}
}