本帖最后由 heroxianf 于 2016-11-3 16:48 编辑
这个是加载关键词的一部分,随着词语和SHEET的增加 后期不会很好管理的样子,请教如何转为sqlite 并读取出来是这个格式的。
#include <Excel.au3>
#include <Array.au3>
#include <File.au3>
#include <FileConstants.au3>
Global $oFiles[999], $oExp[5], $oConditions[5]
Global $FileName1, $FileName2
Global $oExcel1, $oExcel2, $oWorkbook1, $oWorkbook2
Global $ProdArray1, $ProdArray2
$FileName1 = @ScriptDir & '\Test.xlsx'
Local $oExcel = _Excel_Open()
Local $oWorkbook1 = _Excel_BookOpen($oExcel, $FileName1) ;打開EXCEL表
Local $oSheetList = _Excel_SheetList($oWorkbook1) ;读取Sheet列表
;-加载开始----------------------------------------------------------------------
For $iA = 0 To UBound($oSheetList) - 1
;~ With $oWorkbook.ActiveSheet ;默认读取激活的Sheet
With $oWorkbook1.worksheets($oSheetList[$iA][0]) ;读取Sheet列表
$ProdArray1 = .range("a1").currentregion.value
For $n1 = 0 To UBound($ProdArray1) - 1
For $i1 = 0 To UBound($ProdArray1, 2) - 1
$ProdArray1[$n1][$i1] = StringReplace($ProdArray1[$n1][$i1], "'", "")
$oFiles[$iA] = $ProdArray1
Next
Next
EndWith
;-加载结束----------------------------------------------------------------------
For $iA = 0 To UBound($oSheetList) - 1
_ArrayDisplay($oFiles[$iA], $oSheetList[$iA][0])
Next
|