/*------------------------------------------------------------------------------*
 * File Name: minitab.c															*
 * Creation: GD 7/12/2001														*
 * Purpose: Origin C file														*
 * Copyright (c) OriginLab Corp. 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007	*
 * All Rights Reserved															*
 * 																				*
 * Modification Log:															*
 * 		Cheney 7/5/2006 REWRITE_FILE											*
 *------------------------------------------------------------------------------*/
 
 #ifndef _MINITAB_H
 #define _MINITAB_H

///---Sim 11-07-2006 REMOVE_FROM_FILE_SOURCE
//Error Message
enum{
	MNTB_ERR_FAILED_TO_READ_FILE_TO_TREE 			= 	-20,
	MNTB_ERR_FAILED_TO_GET_DATA_FROM_STREAM,
	MNTB_ERR_FAILED_TO_GET_SUBVEC_FROM_BYTE_VECTOR,
	MNTB_ERR_COLUMN_SYNCHRONIZATION_FAILURE_V12,			
	MNTB_ERR_COLUMN_SYNCHRONIZATION_FAILURE,					
	MNTB_ERR_UNKNOWN_DATA_TYPE,			
	MNTB_ERR_FILE_TOO_SMALL,				
	MNTB_ERR_UNSUPPORT_VERSION,
	MNTB_ERR_FAILED_TO_GET_FILE_HEADER,
	MNTB_ERR_FAILED_TO_GET_DATA_HEADER,
	MNTB_ERR_FAILED_TO_GET_DATA,
	MNTB_ERR_FAILED_TO_GET_DATA_PREAMBLE,
	MNTB_ERR_FAILED_TO_GET_DATA_POSTAMBLE,
	MNTB_ERR_FAILED_TO_GET_LENGTHAND_SET_INFO,
};
///---END REMOVE_FROM_FILE_SOURCE
 
 
 //read minitab file
 //return number of column of importing data, or negtive for error.
/// Hong 05/30/07 ADD_DATARANGE_FOR_ORGANIZER
// int readminitab(LPCSTR lpcszFilename, Worksheet& wks, TreeNode& trInfo, int nC1 = 0);
int readminitab(LPCSTR lpcszFilename, Worksheet& wks, TreeNode& trInfo, int nC1 = 0, DataRange& drImported = NULL);
/// end ADD_DATARANGE_FOR_ORGANIZER

 #endif // _MINITAB_H
 
 