设为首页 加入收藏

TOP

使用odbc读写excel类: (2) 源文件 (三)
2014-11-23 23:11:43 来源: 作者: 【 】 浏览:10
Tags:使用 odbc 读写 excel 源文件

483}
484
485void CODBCExcelCell::Set(const CString& strVal)
486{
487 ASSERT(m_Sheet);
488 if (CODBCExcelSheet::Exist == m_Sheet->m_nFlag)
489 {
490 m_Sheet->m_nFlag = CODBCExcelSheet::Update;
491 }
492 m_strVal = strVal; m_strVal.Trim();
493}
494
495void CODBCExcelCell::Set(short sVal)
496{
497 ASSERT(m_Sheet);
498 if (CODBCExcelSheet::Exist == m_Sheet->m_nFlag)
499 {
500 m_Sheet->m_nFlag = CODBCExcelSheet::Update;
501 }
502 m_strVal.Format(_T("%d"), sVal);
503}
504
505void CODBCExcelCell::Set(long lVal)
506{
507 ASSERT(m_Sheet);
508 if (CODBCExcelSheet::Exist == m_Sheet->m_nFlag)
509 {
510 m_Sheet->m_nFlag = CODBCExcelSheet::Update;
511 }
512 m_strVal.Format(_T("%ld"), lVal);
513}
514
515void CODBCExcelCell::Set(float fVal)
516{
517 ASSERT(m_Sheet);
518 if (CODBCExcelSheet::Exist == m_Sheet->m_nFlag)
519 {
520 m_Sheet->m_nFlag = CODBCExcelSheet::Update;
521 }
522 m_strVal.Format(_T("%f"), fVal);
523}
524
525void CODBCExcelCell::Set(double dVal)
526{
527 ASSERT(m_Sheet);
528 if (CODBCExcelSheet::Exist == m_Sheet->m_nFlag)
529 {
530 m_Sheet->m_nFlag = CODBCExcelSheet::Update;
531 }
532 m_strVal.Format(_T("%f"), dVal);
533}

作者“天道酬勤”

首页 上一页 1 2 3 4 5 下一页 尾页 3/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇链表逆序的递归/非递归算法 下一篇使用odbc读写excel类: (1) 头文件

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: