当前位置:首页 > 网络编程 > 软件语言 > C语言 > 在VC6.0中访问Excel文件的代码

在VC6.0中访问Excel文件的代码

点击次数:24 次 发布日期:2008-12-01 12:46:51 作者:源代码网
源代码网推荐

在VC6.0中访问Excel文件的代码,发出来给大家看看!一起交流学习下。


////////////////////////////////////////////////////////////////////////////////
#ifndef _EXCEL_H_
#define _EXCEL_H_
#define LOGOUT
#define LOGOUTCS
#define LOGBOX
//#define LOGOUTBOX
//#define LOGOUTBOXCONSOLE
//#define LOGOUTWINDOW
////////////////////////////////////////////////////////////////////////////////
//LogFile Log信息?出控制
/******************************************************************************
 函数名称:    LogOut
 功       能:    ?出CString?字符信息
 接       口:    const CString sStringBuffer
 返回?     :    空(void)
 其    它:
******************************************************************************/
void LogOut(const CString sStringBuffer)
{
#ifdef LOGOUT
    cout << (LPSTR)(LPCTSTR)sStringBuffer << "\t" ;
#endif
}
/******************************************************************************
 函数名称:    LogOutCS
 功       能:    ?出CString?字符信息
 接       口:    const CString sStringBuffer
 返回?     :    空( void )
 其    它:
******************************************************************************/
void LogOutCS(const CString sStringBuffer)
{
#ifdef LOGOUTCS
    cout << (LPSTR)(LPCTSTR)sStringBuffer << endl;
#endif
}
/******************************************************************************
 函数名称:    LogOutCS
 功       能:    ?出CString?字符信息,及Window消息框
 接       口:    const CString sStringBuffer
 返回?     :    空( void )
 其    它:
******************************************************************************/
void LogOutBox(const CString sStringBuffer)
{
#ifdef LOGOUTBOX
    AfxMessageBox(sStringBuffer);
#endif

#ifdef LOGOUTBOXCONSOLE
    cout << (LPSTR)(LPCTSTR)sStringBuffer << endl;
#endif
}
/******************************************************************************
 函数名称:    LogBox
 功       能:    ?出CString?字符信息,及Window消息框[Page]
 接       口:    const CString sStringBuffer
 返回?     :    空( void )
 其    它:
******************************************************************************/
void LogBox(const CString sStringBuffer)
{
#ifdef LOGBOX
    AfxMessageBox(sStringBuffer);
#endif

#ifdef LOGOUTBOXCONSOLE
    cout << (LPSTR)(LPCTSTR)sStringBuffer << endl;
#endif
}


////////////////////////////////////////////////////////////////////////////////
//ShareSQL SQL?句存?
class SQL
{
public:
            CString    AllRecord;
            CString CreateTable;
            CString    Insert1;
            CString    Insert2;
            CString    Insert3;
            CString    Insert4;
            CString    Insert5;
            CString    Insert6;
            CString    Insert7;
            CString    Insert8;
            CString    Insert9;

public:
            ~SQL( void );
            SQL( void );
};
/******************************************************************************
 函数名称:    SQL
 功       能:    ?造函数
 接       口:    空( void )
 返回?     :    空( void )
 其    它:
******************************************************************************/
SQL::SQL() 源代码网供稿.

网友评论 (0)
会员中心
网络编程
本站推荐
网络编程之精华