。。。
This commit is contained in:
parent
aaec461d4a
commit
c08352b76c
|
@ -426,69 +426,69 @@ void LoadRepairOrderFromXls( const std::wstring & filePath,
|
|||
{
|
||||
int colunmIndex = pSheet->firstCol();
|
||||
|
||||
const wstring && branchName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && orderNo = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && orderType = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && notifyNo = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && damageArea = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && damageDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && generatingDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && policyNo = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && policyNoJQX = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && plateNumber = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && brandName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && isInsuranceObject = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && isSuccess = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && recommandDealerCode = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && recommandDealerName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && recommandDealerCodeInNotify = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && recommandDealerNameInNotify = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && recommandDealerNameInSurvey = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && agentName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && surveyor = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && checkDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && repairingStartDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && repairingFinishDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && status = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && lostItemID = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
const wstring && surveyorRecommandStatus = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
|
||||
//空行跳过
|
||||
if ( orderNo.empty() == true )
|
||||
{
|
||||
rowIndex++;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
RepairOrder order( branchName,
|
||||
orderNo,
|
||||
orderType,
|
||||
notifyNo,
|
||||
damageArea,
|
||||
damageDate,
|
||||
generatingDate,
|
||||
policyNo,
|
||||
policyNoJQX,
|
||||
plateNumber,
|
||||
brandName,
|
||||
isInsuranceObject,
|
||||
isSuccess,
|
||||
recommandDealerCode,
|
||||
recommandDealerName,
|
||||
recommandDealerCodeInNotify,
|
||||
recommandDealerNameInNotify,
|
||||
recommandDealerNameInSurvey,
|
||||
agentName,
|
||||
surveyor,
|
||||
checkDate,
|
||||
repairingStartDate,
|
||||
repairingFinishDate,
|
||||
status,
|
||||
lostItemID,
|
||||
surveyorRecommandStatus );
|
||||
|
||||
orderVector.push_back( order );
|
||||
// const wstring && branchName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && orderNo = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && orderType = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && notifyNo = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && damageArea = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && damageDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && generatingDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && policyNo = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && policyNoJQX = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && plateNumber = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && brandName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && isInsuranceObject = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && isSuccess = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && recommandDealerCode = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && recommandDealerName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && recommandDealerCodeInNotify = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && recommandDealerNameInNotify = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && recommandDealerNameInSurvey = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && agentName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && surveyor = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && checkDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && repairingStartDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && repairingFinishDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && status = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && lostItemID = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
// const wstring && surveyorRecommandStatus = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
//
|
||||
// //空行跳过
|
||||
// if ( orderNo.empty() == true )
|
||||
// {
|
||||
// rowIndex++;
|
||||
//
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// RepairOrder order( branchName,
|
||||
// orderNo,
|
||||
// orderType,
|
||||
// notifyNo,
|
||||
// damageArea,
|
||||
// damageDate,
|
||||
// generatingDate,
|
||||
// policyNo,
|
||||
// policyNoJQX,
|
||||
// plateNumber,
|
||||
// brandName,
|
||||
// isInsuranceObject,
|
||||
// isSuccess,
|
||||
// recommandDealerCode,
|
||||
// recommandDealerName,
|
||||
// recommandDealerCodeInNotify,
|
||||
// recommandDealerNameInNotify,
|
||||
// recommandDealerNameInSurvey,
|
||||
// agentName,
|
||||
// surveyor,
|
||||
// checkDate,
|
||||
// repairingStartDate,
|
||||
// repairingFinishDate,
|
||||
// status,
|
||||
// lostItemID,
|
||||
// surveyorRecommandStatus );
|
||||
//
|
||||
// orderVector.push_back( order );
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,14 @@ void setKey( libxl::Book * pBook )
|
|||
}
|
||||
}
|
||||
|
||||
void setKey( libxl::IBookT<char> * pBook )
|
||||
{
|
||||
if (pBook != nullptr)
|
||||
{
|
||||
pBook->setKey("cpic", "windows-202d21040bc4e70060bc6264a6ucu7i1");
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring ReadCellStringFromXlsx( libxl::IBookT<wchar_t> * pBook,
|
||||
unsigned int sheetIndex,
|
||||
unsigned int rowIndex,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* \param pBook
|
||||
************************************************/
|
||||
void setKey( libxl::Book * pBook );
|
||||
void setKey( libxl::IBookT<char> * pBook );
|
||||
|
||||
/************************************************
|
||||
* \brief 从xlsx文件单元格中读取数据,以字符串为返回值。
|
||||
|
|
|
@ -23,6 +23,8 @@ void excelTest()
|
|||
|
||||
wstring filePath = L"D:/develop/projects_win/2019/car_dealer_util/数据/345517_1.xls";
|
||||
|
||||
string xlsFilePath = "D:/develop/projects_win/2019/car_dealer_util/数据/345517_1.xls";
|
||||
|
||||
//LoadCarDealerSchemeFromXlsx(filePath, 0, 1, schemeVector);
|
||||
//LoadCarDealerAchievementFromXlsx( filePath, 0, 1, achievementsVector );
|
||||
LoadRepairOrderFromXls(filePath, 0, 1, repairOrderVector);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue