This commit is contained in:
Kane Wang 2020-03-18 20:42:45 +08:00
parent 13309fcf74
commit 1c61f5c9c5
1 changed files with 47 additions and 32 deletions

View File

@ -63,18 +63,33 @@ void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
firstRowIndex = pSheet->firstRow();
lastRowIndex = pSheet->lastRow();
unsigned int index = firstColumnIndex;
unsigned int colIndex = firstColumnIndex;
unsigned int rowIndex = firstRowIndex;
//保存标题
while ( index <= lastColumnIndex )
while (colIndex <= lastColumnIndex)
{
wstring && title = ReadCellStringFromXlsx( pBook, sheetIndex, titleRowIndex, index, false );
wstring&& title = ReadCellStringFromXlsx(pBook, sheetIndex, titleRowIndex, colIndex, false);
titleMap.insert( pair<int, wstring>( index, title ) );
titleMap.insert(pair<int, wstring>(colIndex, title));
++index;
++colIndex;
}
//逐行保存数据
for (rowIndex = firstRowIndex; rowIndex >= lastRowIndex; rowIndex++)
{
//如果是标题行,就跳过
if (rowIndex == titleRowIndex)
{
continue;
}
//逐列绑定sql语句
for (colIndex = firstColumnIndex; colIndex <= lastColumnIndex; colIndex++)
{
}
}
}