/*------------------------------------------------------------------------------*
* File Name:	readDCF.h														*
* Creation:	GRD 8/7/2001														*
* Purpose:		OriginC Source C file											*
* Copyright (c) OriginLab Corp. 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008	*
* All Rights Reserved															*
* 																				*
* Modification Log:																*
 *	Arvin 2006-11-16 CREATE														*
 *  Hong 11/17/06 ADD_INFO_TO_COLUMNS											*
 *	Hong 07/17/08 v8.0903 FIX_SOME_IMPORT_HAVE_DUPLICATE_SHEET_NAME_NO_AUTO_ENUM*
 *------------------------------------------------------------------------------*/

#ifndef _READDCF_H
#define _READDCF_H

/// Hong 11/20/06 MOVE_FROM_FILE_SOURCE
//Error Message
enum{
	DCF_FAIL_TO_OPEN_FILE				=	-10,			
	DCF_FILE_TOO_SMALL,			
	DCF_NUMBER_OF_COLUMNS_INCONSISTENT,			
	DCF_UNSUPPORTED_DATA_TYPE,			
	DCF_UNSUPPORTED_VERSION,
	DCF_FAIL_TO_READ_FILE_INFO,
	DCF_FAIL_TO_READ_DATA
};
/// end MOVE_FROM_FILE_SOURCE

/// Hong 07/17/08 v8.0903 FIX_SOME_IMPORT_HAVE_DUPLICATE_SHEET_NAME_NO_AUTO_ENUM
enum
{
	DCF_RENAME_SHEET_BY_FILENAME		= 0x00000001,
};
/// end FIX_SOME_IMPORT_HAVE_DUPLICATE_SHEET_NAME_NO_AUTO_ENUM

// read Data Translation file
// return number of column of importing data, or negtive for error.
/// Hong 11/17/06 ADD_INFO_TO_COLUMNS
//int readDCF(LPCSTR lpcszFilename, Worksheet& wks, TreeNode& trInfo, int nC1 = 0);
/// Hong 07/17/08 v8.0903 FIX_SOME_IMPORT_HAVE_DUPLICATE_SHEET_NAME_NO_AUTO_ENUM
//int readDCF(LPCSTR lpcszFilename, Worksheet& wks, TreeNode& trInfo, bool& bAddSampling, int nC1 = 0);
int readDCF(LPCSTR lpcszFilename, Worksheet& wks, TreeNode& trInfo, bool& bAddSampling, int nC1 = 0, DWORD dwOptions = DCF_RENAME_SHEET_BY_FILENAME);
/// end FIX_SOME_IMPORT_HAVE_DUPLICATE_SHEET_NAME_NO_AUTO_ENUM
/// end ADD_INFO_TO_COLUMNS

#endif // _READDCF_H
