...
This commit is contained in:
		@@ -11,6 +11,7 @@ using namespace std;;
 | 
				
			|||||||
using namespace ocilib;
 | 
					using namespace ocilib;
 | 
				
			||||||
using namespace libxl;
 | 
					using namespace libxl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
 | 
					void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
 | 
				
			||||||
                                        unsigned int         sheetIndex,
 | 
					                                        unsigned int         sheetIndex,
 | 
				
			||||||
                                        bool                 hasTitleRow,
 | 
					                                        bool                 hasTitleRow,
 | 
				
			||||||
@@ -62,9 +63,11 @@ void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
 | 
				
			|||||||
	firstRowIndex = pSheet->firstRow();
 | 
						firstRowIndex = pSheet->firstRow();
 | 
				
			||||||
	lastRowIndex = pSheet->lastRow();
 | 
						lastRowIndex = pSheet->lastRow();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	unsigned int index = firstColumnIndex;
 | 
						unsigned int colIndex = firstColumnIndex;
 | 
				
			||||||
 | 
						unsigned int rowIndex = firstRowIndex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//保存标题
 | 
						//保存标题
 | 
				
			||||||
 | 
					<<<<<<< HEAD
 | 
				
			||||||
	if (hasTitleRow)
 | 
						if (hasTitleRow)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		while (index <= lastColumnIndex)
 | 
							while (index <= lastColumnIndex)
 | 
				
			||||||
@@ -78,4 +81,31 @@ void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//逐行保存数据
 | 
						//逐行保存数据
 | 
				
			||||||
 | 
					=======
 | 
				
			||||||
 | 
						while (colIndex <= lastColumnIndex)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							wstring&& title = ReadCellStringFromXlsx(pBook, sheetIndex, titleRowIndex, colIndex, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							titleMap.insert(pair<int, wstring>(colIndex, title));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							++colIndex;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						//逐行保存数据
 | 
				
			||||||
 | 
						for (rowIndex = firstRowIndex; rowIndex >= lastRowIndex; rowIndex++)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							//如果是标题行,就跳过
 | 
				
			||||||
 | 
							if (rowIndex == titleRowIndex)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							//逐列绑定sql语句
 | 
				
			||||||
 | 
							for (colIndex = firstColumnIndex; colIndex <= lastColumnIndex; colIndex++)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					>>>>>>> 1c61f5c9c59d272bf37edf8d9217c4389b802ceb
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user