本帖最后由 heroxianf 于 2016-11-16 01:09 编辑
笨办法整出来了,懂的 指点一下。这样写 以后添加列 累死个屁的。
_SQLite_Query($test, "SELECT * FROM Monitor;", $hQuery)
While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[0], "A" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[1], "B" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[2], "C" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[3], "D" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[4], "E" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[5], "F" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[6], "G" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[7], "H" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[8], "I" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[9], "J" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[10], "K" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[11], "L" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[12], "M" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[13], "N" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[14], "O" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[15], "P" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[16], "Q" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[17], "R" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[18], "S" & $i)
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aRow[19], "T" & $i)
$i = $i + 1
WEnd
|