- API -
cellSearchResult = reaper.AZ_Excel_SearchRowsInAllWorksheets(excelWorksheet, searchStr, targetCulume, range, isRegex)
- API Detail-
▼Input value
excelWorksheet(ExcelWorksheet) : Worksheet
searchStr(string) : Search string
targetCulume(string) : target column
range(string) : Search range
・Single row and column specification
・Row 1: Row 2, Column 1: Column 2 Multiple specifications (optional, default: all range)
isRegex(boolean): Regular expression search (optional, default: FALSE)
▼Output value
cellSearchResult(ExcelSheetInfo) : Worksheet
-Name : Worksheet name
-Worksheet : Worksheet
-Cells: Cells (map)
- key : line number
- value : column (map)
- key : column number
- value : cell value
- SCRIPT -
dofile(reaper.AZ_GetLuaInitPath())
require("reaper_AZSTOKE_GOLD")
function showObject(object, depth)
local obj = object
if depth == nil then depth = 0 end
if(type(obj) == "table") then
Msg("")
for k, v in pairs(obj) do
for i = 1, depth, 1 do reaper.ShowConsoleMsg(" ") end
reaper.ShowConsoleMsg(tostring(k) .. " : ")
showObject(v, depth + 4)
end
else
Msg(obj)
end
end
doc = reaper.AZ_Excel_OpenFile("D:\\rigdocks\\01_APIDock\\test.xlsx")
sheetList = reaper.AZ_Excel_SearchRowsInAllWorksheets(doc, ".*[a|d].*", "F", "2:12,B:G", true)
Msg("result : " .. tostring(reaper.AZ_GetErrorCode()))
showObject(sheetList)
reaper.AZ_Excel_CloseFile(doc)
Excel
AZ_Excel_SearchRowsInAllWorksheets
Supported versions:
1.1.0
onwards
Row search in all sheets
