excel.getWorksheetIndex
Description
Get an Excel worksheet index by title.

Parameters
bookID number
sheetTitle string

Return value
index number

Example
local xl = excel.load("c:\\test.xls")
if xl < 1 then
    print("Error loading workbook")
else
    -- print index
    local index = excel.getWorksheetIndex(xl, "Sheet1")
    print("Index: " .. index)

    -- close the workbook
    excel.close(xl)
end if

Comments
Result index is zero based.

See also

Back
Generated on the 26 June 2024 at 22:01:28 (UK Time)