Scalar
This guide demonstrates different features of excel scalar type.
Scalar
A worksheet Apple
in HelloWorld.xlsx:
ID | Name | Desc |
---|---|---|
uint32 | string | string |
Item’s ID | Item’s Name | Item’s Description |
1 | Apple | A kind of delicious fruit. |
In this worksheet, three scalar fields are defined:
- ID:
uint32
- Name:
string
- Desc:
string
Generated:
hello_world.proto
// --snip--
option (tableau.workbook) = {name:"HelloWorld.xlsx"};
message Apple {
option (tableau.worksheet) = {name:"Apple" namerow:1 typerow:2 noterow:3 datarow:4};
uint32 id = 1 [(tableau.field) = {name:"ID"}];
string name = 2 [(tableau.field) = {name:"Name"}];
string desc = 3 [(tableau.field) = {name:"Desc"}];
}
Apple.json
{
"id": 1,
"name": "Apple",
"desc": "A kind of delicious fruit."
}
Note
Scalar type is usually used to define fields of struct type. Struct â