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}
作者“天道酬勤”
|