-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtable.lua
More file actions
28 lines (22 loc) · 767 Bytes
/
table.lua
File metadata and controls
28 lines (22 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---@type lplotPublicModuleClass
local plot = require("lplot")
local teste = plot.newNotebook()
-- Test array format
local array_format_table = {
{"name", "age", "city"},
{"mateus", "22", "rio de janeiro"},
{"joao", "23", "sao paulo"},
{"maria", "24", "belo horizonte"},
}
-- Test object format
local object_format_table = {
{name = "mateus", age = "22", city = "rio de janeiro"},
{name = "joao", age = "23", city = "sao paulo"},
{name = "maria", age = "24", city = "belo horizonte"},
}
teste.add_text('<h2>Array Format Table</h2>')
teste.add_table(array_format_table)
teste.add_text('<h2>Object Format Table</h2>')
teste.add_table(object_format_table)
local result = teste.get_html()
io.open("table.html", "w"):write(result):close()