Skip to content

Latest commit

 

History

History
132 lines (105 loc) · 1.53 KB

MODEL.md

File metadata and controls

132 lines (105 loc) · 1.53 KB

Workbook Model

The workbook and its components define a simple JavaScript Object model which can be accessed and manipulated if desired.

Workbook Model

{
    worksheets: [
        // array of worksheet models
    ]
}

Worksheet Model

{
    // worksheet id (integer>=1)
    id: 1,
    
    // worksheet name
    name: "blort",
    
    // rows
    rows: [
        // array of row models
    ],
    
    // merge ranges
    "merges": [
        "A2:B3"
    ],
    "dimensions": {
        "top": 1,
        "left": 1,
        "bottom": 3,
        "right": 6
    }    
}

Row Model

{
    // row number
    number: 1,
    cells: [
        // array of cell models
    ],
    
    // min column number
    min: 1,
    
    // maximum column number
    max: 6
}

Cell Models

Null Cell Model

{
    address: "A1",
    type: 0
}

Merge Cell Model

{
    address: "B1",
    type: 1,
    master: "A1"
}

Number Cell Model

{
    address: "B1",
    type: 2,
    value: 5
}

String Cell Model

{
    address: "B1",
    type: 2,
    value: "Hello, World!"
}

Date Cell Model

{
    address: "C1",
    type: 3,
    value: new Date()
}

Formula Cell Model

{
    address: "D1",
    type: 4,
    formula: "A1+A2",
    result: 7
}

Hyperlink Cell Model

{
    "address": "F1",
    "type": 5,
    "text": "www.link.com",
    "hyperlink": "http://www.link.com"
}