MCPcopy Create free account
hub / github.com/DFHack/dfhack / list_sheets

Function list_sheets

plugins/xlsxreader.cpp:97–104  ·  view source on GitHub ↗

takes a file handle and returns a table-list of sheet names

Source from the content-addressed store, hash-verified

95
96// takes a file handle and returns a table-list of sheet names
97int list_sheets(lua_State *L) {
98 auto file_handle = (xlsx_file_handle *)get_xlsxreader_handle(L);
99 CHECK_NULL_POINTER(file_handle->handle);
100 auto sheetNames = std::vector<std::string>();
101 xlsxioread_list_sheets(file_handle->handle, list_callback, &sheetNames);
102 Lua::PushVector(L, sheetNames, true);
103 return 1;
104}
105
106// takes the sheet handle and returns a table-list of strings, limited to the
107// requested number of tokens if specified and > 0, or nil if we already

Callers

nothing calls this directly

Calls 2

get_xlsxreader_handleFunction · 0.85
PushVectorFunction · 0.85

Tested by

no test coverage detected