Skip to content

Commit

Permalink
扩展导表工具参数
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyoo0812 committed Apr 23, 2024
1 parent 519ac09 commit 59cf5b3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/excel2lua/convertor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,20 @@ end

local function find_sheet_data_struct(sheet)
local header = {}
local field_type = {}
local field_types = {}
if not head_line then
head_line = start_line - 1
end
for col = sheet.first_col, sheet.last_col do
-- 读取类型行,作为筛选条件
field_type[col] = get_sheet_value(sheet, type_line, col)
local field_type = get_sheet_value(sheet, type_line, col)
if field_type and field_type ~= "" then
field_types[col] = get_sheet_value(sheet, type_line, col)
end
-- 读取第四行作为表头
header[col] = get_sheet_value(sheet, head_line, col)
end
return header, field_type
return header, field_types
end

--导出到目标文件
Expand Down

0 comments on commit 59cf5b3

Please sign in to comment.