/* **************************************************
	wcFileConstant.h
	File 常量表
	djg 2010-5-28
************************************************** */
#ifndef _WC_FILE_CONSTANT_H_
#define _WC_FILE_CONSTANT_H_

//设置单元格格式
//1. 设置单元格格式化字符串
//		fmtString:
#define 		XLS_FORMAT_GENERAL		"General"
#define 		XLS_FORMAT_TEXT			"@"
#define 		XLS_FORMAT_INTEGER		"0"
#define 		XLS_FORMAT_DECIMAL		"0.00"
#define 		XLS_FORMAT_PERCENT		"0%"
#define 		XLS_FORMAT_DATE			"M/D/YY"
#define 		XLS_FORMAT_TIME			"h:mm:ss"
#define 		XLS_FORMAT_DATETIME		"M/D/YY h:mm"
//		也可以自定义，例如：需要显示三位小数则设置fmt为 "0.000"
//		注意，设置单元格格式后，excelSetCell需要设置相对应的类型值。
//		用在函数中：void excelSetCellFormatString(int row, int col, string fmtString, int sheetIndex = 0);
	
// 2. 设置单元格字体: option, weight, escapementType, underlineType	
//		2.1 option:
#define			EXCEL_FONT_BOLD			 0x01
#define			EXCEL_FONT_ITALIC		 0x02
#define			EXCEL_FONT_UNDERLINED	 0x04	
#define			EXCEL_FONT_STRUCK_OUT	 0x08
#define			EXCEL_FONT_OUTLINED		 0x10
#define			EXCEL_FONT_SHADOWED		 0x20
#define			EXCEL_FONT_CONDENSED	 0x40
#define			EXCEL_FONT_EXTENDED		 0x80
			
//		2.2 weight:
#define			EXCEL_FW_DONTCARE         0
#define			EXCEL_FW_THIN             100
#define			EXCEL_FW_EXTRALIGHT       200
#define			EXCEL_FW_LIGHT            300
#define			EXCEL_FW_NORMAL           400
#define			EXCEL_FW_MEDIUM           500
#define			EXCEL_FW_SEMIBOLD         600
#define			EXCEL_FW_BOLD             700
#define			EXCEL_FW_EXTRABOLD        800
#define			EXCEL_FW_HEAVY            900	
#define			EXCEL_FW_ULTRALIGHT       EXCEL_FW_EXTRALIGHT
#define			EXCEL_FW_REGULAR          EXCEL_FW_NORMAL
#define			EXCEL_FW_DEMIBOLD         EXCEL_FW_SEMIBOLD
#define			EXCEL_FW_ULTRABOLD        EXCEL_FW_EXTRABOLD
#define			EXCEL_FW_BLACK            EXCEL_FW_HEAVY

//		2.3	escapementType:
#define			EXCEL_ESCAPEMENT_NONE		  0
#define			EXCEL_ESCAPEMENT_SUPERSCRIPT  1
#define			EXCEL_ESCAPEMENT_SUBSCRIPT	  2
#define			
//		2.4	underlineType:
#define			EXCEL_UNDERLINE_NONE			0x00
#define			EXCEL_UNDERLINE_SINGLE			0x01
#define			EXCEL_UNDERLINE_DOUBLE			0x02
#define			EXCEL_UNDERLINE_SINGLE_ACCOUNTING	0x21
#define			EXCEL_UNDERLINE_DOUBLE_ACCOUNTING	0x22
//		2.5 colorIndex:
#define			EGA_BLACK	0	// 000000H
#define			EGA_WHITE	1	// FFFFFFH
#define			EGA_RED		2	// FF0000H
#define			EGA_GREEN	3	// 00FF00H
#define			EGA_BLUE	4	// 0000FFH
#define			EGA_YELLOW	5	// FFFF00H
#define			EGA_MAGENTA	6	// FF00FFH
#define			EGA_CYAN	7	// 00FFFFH
//用在函数中：void excelSetCellFont(int row, int col, string fontName="Arial", int fontOption=0, int fontHeight=200, int fontWeight=400, int fontEscapementType=0, int fontUnderlineType=0, int fontColorIndex = 0, int sheetIndex = 0);
	
// 3. 单元格设置
//		infoType:	1 单元格对齐, 2 转角
		
//		3.1	单元格对齐alignment:
		// horizontal aligmment
#define		EXCEL_HALIGN_GENERAL		 0x00
#define		EXCEL_HALIGN_LEFT			 0x01
#define		EXCEL_HALIGN_CENTRED		 0x02
#define		EXCEL_HALIGN_RIGHT			 0x03
#define		EXCEL_HALIGN_FILLED			 0x04
#define		EXCEL_HALIGN_JUSITFIED		 0x05
#define		EXCEL_HALIGN_SEL_CENTRED	 0x06
#define		EXCEL_HALIGN_DISTRIBUTED	 0x07
		
		// vertical alignment
#define		EXCEL_VALIGN_TOP			 0x00
#define		EXCEL_VALIGN_CENTRED		 0x10
#define		EXCEL_VALIGN_BOTTOM			 0x20
#define		EXCEL_VALIGN_JUSTIFIED		 0x30
#define		EXCEL_VALIGN_DISTRIBUTED	 0x40

#define		EXCEL_JUSTIFY_LAST_LINE		 0x80
//用在函数中：void excelSetCellInfo(int row, int col, int infoType, int val, int sheetIndex = 0);

#endif //_WC_FILE_CONSTANT_H_
