This commit is contained in:
2020-05-13 18:17:27 +08:00
parent 2d3e5a8e69
commit 9cfdd61539
9 changed files with 250 additions and 44 deletions

View File

@@ -67,24 +67,22 @@ void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
unsigned int rowIndex = firstRowIndex;
//保存标题
<<<<<<< HEAD
if (hasTitleRow)
{
while (index <= lastColumnIndex)
while (colIndex <= lastColumnIndex)
{
wstring&& title = ReadCellStringFromXlsx(pBook, sheetIndex, firstRowIndex, index, false);
wstring&& title = ReadCellStringFromXlsx(pBook, sheetIndex, firstRowIndex, colIndex, false);
titleMap.insert(pair<int, wstring>(index, title));
titleMap.insert(pair<int, wstring>(colIndex, title));
++index;
++colIndex;
}
}
//逐行保存数据
=======
while (colIndex <= lastColumnIndex)
{
wstring&& title = ReadCellStringFromXlsx(pBook, sheetIndex, titleRowIndex, colIndex, false);
wstring&& title = ReadCellStringFromXlsx(pBook, sheetIndex, firstRowIndex, colIndex, false);
titleMap.insert(pair<int, wstring>(colIndex, title));
@@ -95,7 +93,7 @@ void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
for (rowIndex = firstRowIndex; rowIndex >= lastRowIndex; rowIndex++)
{
//如果是标题行,就跳过
if (rowIndex == titleRowIndex)
if (rowIndex == firstRowIndex)
{
continue;
}
@@ -107,5 +105,4 @@ void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
}
}
>>>>>>> 1c61f5c9c59d272bf37edf8d9217c4389b802ceb
}