MentDB
Mentalese Database Engine
Back / All functions / Excel

Work with Excel document.

excel loadexcel load emptyexcel showexcel saveexcel existexcel sheet addexcel sheet deleteexcel sheet max_rowexcel sheet showexcel cell getexcel cell evalexcel cell refexcel cell setexcel cell formatexcel closeexcel close_allexcel build_in_format

excel load <excelId> <path>

Description

    Load an Excel document.

Parameters

    excelId:   The excel id - string - required
    path:   The file path - string - required
admin
excel load "excelId" "/Users/jimmitry/Desktop/test.xls"
mentdb
1

excel load empty <excelId>

Description

    Load an empty Excel document.

Parameters

    excelId:   The excel id - string - required
admin
excel load empty "excelId"
mentdb
1

excel show

Description

    All loaded Excel document.

admin
excel show
mentdb
["excelId"]

excel save <excelId> <path>

Description

    Save an Excel document into a xls file.

Parameters

    excelId:   The excel id - string - required
    path:   The file path - string - required
admin
excel save "excelId" "/Users/jimmitry/Desktop/test.xls"
mentdb
1

excel exist <excelId>

Description

    Check if an Excel document already loaded.

Parameters

    excelId:   The excel id - string - required
admin
excel exist "excelId"
mentdb
1

excel sheet add <excelId> <sheetName>

Description

    Add a new sheet into an excel document.

Parameters

    excelId:   The excel id - string - required
    sheetName:   The sheet name - string - required
admin
excel sheet add "excelId" "sheet2"
mentdb
1

excel sheet delete <excelId> <sheetName>

Description

    Delete a sheet from an excel document.

Parameters

    excelId:   The excel id - string - required
    sheetName:   The sheet name - string - required
admin
excel sheet delete "excelId" "sheet2"
mentdb
1

excel sheet max_row <excelId> <sheetName>

Description

    Get a max row for a specific sheet.

Parameters

    excelId:   The excel id - string - required
    sheetName:   The sheet name - string - required
admin
excel sheet max_row "excelId" "sheet2"
mentdb
432

excel sheet show <excelId>

Description

    Get all sheets from an Excel document.

Parameters

    excelId:   The excel id - string - required
admin
excel sheet show "excelId"
mentdb
["sheet2"]

excel cell get <excelId> <sheetName> <rowIndex> <colIndex>

Description

    Get a cell value.

Parameters

    excelId:   The excel id - string - required
    sheetName:   The sheet name - string - required
    rowIndex:   The row index - number - required
    colIndex:   The col index - number - required
admin
excel cell get "excelId" "sheet1" 1 1
mentdb
25

excel cell eval <excelId> <sheetName> <rowIndex> <colIndex>

Description

    Eval a cell.

Parameters

    excelId:   The excel id - string - required
    sheetName:   The sheet name - string - required
    rowIndex:   The row index - number - required
    colIndex:   The col index - number - required
admin
excel cell eval "excelId" "sheet1" 1 1
mentdb
25

excel cell ref <cell>

Description

    Get a cell reference.

Parameters

    cell:   The cell (ex: Z3) - string - required
admin
excel cell ref "Z3"
mentdb
{"col": 25,"row": 2}

excel cell set <excelId> <sheetName> <rowIndex> <colIndex> <value> <type>

Description

    Set a value into a cell.

Parameters

    excelId:   The excel id - string - required
    sheetName:   The sheet name - string - required
    rowIndex:   The row index - number - required
    colIndex:   The col index - number - required
    value:   The value - string - required
    type:   The type (STR|NUM|BOOL|DATETIME|FORMULA|BLANK) - string - required
admin
excel cell set "excelId" "sheet1" 1 1 "value" STR|NUM|BOOL|DATETIME|FORMULA|BLANK
mentdb
1
admin
excel close_all; excel load empty "excelId"; excel sheet add "excelId" "sheet1"; excel cell set "excelId" "sheet1" 1 1 "str" STR; excel cell set "excelId" "sheet1" 1 2 ".3478" NUM; excel cell set "excelId" "sheet1" 1 3 true BOOL; excel cell set "excelId" "sheet1" 1 4 (date systimestamp;) DATETIME; excel cell set "excelId" "sheet1" 1 5 "C2+1" FORMULA; excel cell set "excelId" "sheet1" 1 6 "" BLANK; excel save "excelId" "/Users/jimmitry/Desktop/test.xls";
mentdb
1

excel cell format <excelId> <sheetName> <rowIndex> <colIndex> <format> <config>

Description

    Set the format for a cell.

Parameters

    excelId:   The excel id - string - required
    sheetName:   The sheet name - string - required
    rowIndex:   The row index - number - required
    colIndex:   The col index - number - required
    format:   The format (example: 'm/d/yy h:mm' | '0%' ...) - string - required
    config:   The json format configuration - string - required
admin
json load "style" "{}"; json iobject "style" / "HorizontalAlignment" "CENTER" STR; json iobject "style" / "HorizontalAlignment" "CENTER_SELECTION" STR; json iobject "style" / "HorizontalAlignment" "DISTRIBUTED" STR; json iobject "style" / "HorizontalAlignment" "FILL" STR; json iobject "style" / "HorizontalAlignment" "GENERAL" STR; json iobject "style" / "HorizontalAlignment" "JUSTIFY" STR; json iobject "style" / "HorizontalAlignment" "LEFT" STR; json iobject "style" / "HorizontalAlignment" "RIGHT" STR; json iobject "style" / "VerticalAlignment" "BOTTOM" STR; json iobject "style" / "VerticalAlignment" "TOP" STR; json iobject "style" / "VerticalAlignment" "DISTRIBUTED" STR; json iobject "style" / "VerticalAlignment" "JUSTIFY" STR; json iobject "style" / "VerticalAlignment" "CENTER" STR; json iobject "style" / "BorderBottom" "DASH_DOT" STR; json iobject "style" / "BorderBottom" "DASH_DOT_DOT" STR; json iobject "style" / "BorderBottom" "DASHED" STR; json iobject "style" / "BorderBottom" "DOTTED" STR; json iobject "style" / "BorderBottom" "DOUBLE" STR; json iobject "style" / "BorderBottom" "HAIR" STR; json iobject "style" / "BorderBottom" "MEDIUM" STR; json iobject "style" / "BorderBottom" "MEDIUM_DASH_DOT" STR; json iobject "style" / "BorderBottom" "MEDIUM_DASH_DOT_DOT" STR; json iobject "style" / "BorderBottom" "MEDIUM_DASHED" STR; json iobject "style" / "BorderBottom" "NONE" STR; json iobject "style" / "BorderBottom" "SLANTED_DASH_DOT" STR; json iobject "style" / "BorderBottom" "THICK" STR; json iobject "style" / "BorderBottom" "THIN" STR; json iobject "style" / "BorderTop" "DASH_DOT" STR; json iobject "style" / "BorderTop" "DASH_DOT_DOT" STR; json iobject "style" / "BorderTop" "DASHED" STR; json iobject "style" / "BorderTop" "DOTTED" STR; json iobject "style" / "BorderTop" "DOUBLE" STR; json iobject "style" / "BorderTop" "HAIR" STR; json iobject "style" / "BorderTop" "MEDIUM" STR; json iobject "style" / "BorderTop" "MEDIUM_DASH_DOT" STR; json iobject "style" / "BorderTop" "MEDIUM_DASH_DOT_DOT" STR; json iobject "style" / "BorderTop" "MEDIUM_DASHED" STR; json iobject "style" / "BorderTop" "NONE" STR; json iobject "style" / "BorderTop" "SLANTED_DASH_DOT" STR; json iobject "style" / "BorderTop" "THICK" STR; json iobject "style" / "BorderTop" "THIN" STR; json iobject "style" / "BorderLeft" "DASH_DOT" STR; json iobject "style" / "BorderLeft" "DASH_DOT_DOT" STR; json iobject "style" / "BorderLeft" "DASHED" STR; json iobject "style" / "BorderLeft" "DOTTED" STR; json iobject "style" / "BorderLeft" "DOUBLE" STR; json iobject "style" / "BorderLeft" "HAIR" STR; json iobject "style" / "BorderLeft" "MEDIUM" STR; json iobject "style" / "BorderLeft" "MEDIUM_DASH_DOT" STR; json iobject "style" / "BorderLeft" "MEDIUM_DASH_DOT_DOT" STR; json iobject "style" / "BorderLeft" "MEDIUM_DASHED" STR; json iobject "style" / "BorderLeft" "NONE" STR; json iobject "style" / "BorderLeft" "SLANTED_DASH_DOT" STR; json iobject "style" / "BorderLeft" "THICK" STR; json iobject "style" / "BorderLeft" "THIN" STR; json iobject "style" / "BorderRight" "DASH_DOT" STR; json iobject "style" / "BorderRight" "DASH_DOT_DOT" STR; json iobject "style" / "BorderRight" "DASHED" STR; json iobject "style" / "BorderRight" "DOTTED" STR; json iobject "style" / "BorderRight" "DOUBLE" STR; json iobject "style" / "BorderRight" "HAIR" STR; json iobject "style" / "BorderRight" "MEDIUM" STR; json iobject "style" / "BorderRight" "MEDIUM_DASH_DOT" STR; json iobject "style" / "BorderRight" "MEDIUM_DASH_DOT_DOT" STR; json iobject "style" / "BorderRight" "MEDIUM_DASHED" STR; json iobject "style" / "BorderRight" "NONE" STR; json iobject "style" / "BorderRight" "SLANTED_DASH_DOT" STR; json iobject "style" / "BorderRight" "THICK" STR; json iobject "style" / "BorderRight" "THIN" STR; json iobject "style" / "BottomBorderColor" "0,0,0" STR; json iobject "style" / "LeftBorderColor" "0,0,0" STR; json iobject "style" / "RightBorderColor" "0,0,0" STR; json iobject "style" / "TopBorderColor" "0,0,0" STR; json iobject "style" / "Hidden" false STR; json iobject "style" / "Locked" false STR; json iobject "style" / "QuotePrefixed" false STR; json iobject "style" / "ShrinkToFit" false STR; json iobject "style" / "WrapText" false STR; json iobject "style" / "Font" "{}" OBJ; json iobject "style" /Font "fontName" "Arial" STR; json iobject "style" /Font "size" 16 STR; json iobject "style" /Font "color" "255,0,0" STR; json iobject "style" /Font "bold" true STR; json iobject "style" /Font "italic" true STR; json iobject "style" / "Rotation" 90 STR; json iobject "style" / "FillPattern" "solid_foreground" STR; json iobject "style" / "FillPattern" "alt_bars" STR; json iobject "style" / "FillPattern" "big_spots" STR; json iobject "style" / "FillPattern" "bricks" STR; json iobject "style" / "FillPattern" "diamonds" STR; json iobject "style" / "FillPattern" "fine_dots" STR; json iobject "style" / "FillPattern" "least_dots" STR; json iobject "style" / "FillPattern" "less_dots" STR; json iobject "style" / "FillPattern" "no_fill" STR; json iobject "style" / "FillPattern" "sparse_dots" STR; json iobject "style" / "FillPattern" "squares" STR; json iobject "style" / "FillPattern" "thick_backward_diag" STR; json iobject "style" / "FillPattern" "thick_forward_diag" STR; json iobject "style" / "FillPattern" "thick_horz_bands" STR; json iobject "style" / "FillPattern" "thick_vert_bands" STR; json iobject "style" / "FillPattern" "thin_backward_diag" STR; json iobject "style" / "FillPattern" "thin_forward_diag" STR; json iobject "style" / "FillPattern" "thin_horz_bands" STR; json iobject "style" / "FillPattern" "thin_vert_bands" STR; json iobject "style" / "FillForegroundColor" "AQUA" STR; json iobject "style" / "FillForegroundColor" "AUTOMATIC" STR; json iobject "style" / "FillForegroundColor" "BLACK" STR; json iobject "style" / "FillForegroundColor" "BLUE" STR; json iobject "style" / "FillForegroundColor" "BLUE_GREY" STR; json iobject "style" / "FillForegroundColor" "BRIGHT_GREEN" STR; json iobject "style" / "FillForegroundColor" "BROWN" STR; json iobject "style" / "FillForegroundColor" "CORAL" STR; json iobject "style" / "FillForegroundColor" "CORNFLOWER_BLUE" STR; json iobject "style" / "FillForegroundColor" "DARK_BLUE" STR; json iobject "style" / "FillForegroundColor" "DARK_GREEN" STR; json iobject "style" / "FillForegroundColor" "DARK_RED" STR; json iobject "style" / "FillForegroundColor" "DARK_TEAL" STR; json iobject "style" / "FillForegroundColor" "DARK_YELLOW" STR; json iobject "style" / "FillForegroundColor" "GOLD" STR; json iobject "style" / "FillForegroundColor" "GREEN" STR; json iobject "style" / "FillForegroundColor" "GREY_25_PERCENT" STR; json iobject "style" / "FillForegroundColor" "GREY_40_PERCENT" STR; json iobject "style" / "FillForegroundColor" "GREY_50_PERCENT" STR; json iobject "style" / "FillForegroundColor" "GREY_80_PERCENT" STR; json iobject "style" / "FillForegroundColor" "INDIGO" STR; json iobject "style" / "FillForegroundColor" "LAVENDER" STR; json iobject "style" / "FillForegroundColor" "LEMON_CHIFFON" STR; json iobject "style" / "FillForegroundColor" "LIGHT_BLUE" STR; json iobject "style" / "FillForegroundColor" "LIGHT_CORNFLOWER_BLUE" STR; json iobject "style" / "FillForegroundColor" "LIGHT_GREEN" STR; json iobject "style" / "FillForegroundColor" "LIGHT_ORANGE" STR; json iobject "style" / "FillForegroundColor" "LIGHT_TURQUOISE" STR; json iobject "style" / "FillForegroundColor" "LIGHT_YELLOW" STR; json iobject "style" / "FillForegroundColor" "LIME" STR; json iobject "style" / "FillForegroundColor" "MAROON" STR; json iobject "style" / "FillForegroundColor" "OLIVE_GREEN" STR; json iobject "style" / "FillForegroundColor" "ORANGE" STR; json iobject "style" / "FillForegroundColor" "ORCHID" STR; json iobject "style" / "FillForegroundColor" "PALE_BLUE" STR; json iobject "style" / "FillForegroundColor" "PINK" STR; json iobject "style" / "FillForegroundColor" "PLUM" STR; json iobject "style" / "FillForegroundColor" "RED" STR; json iobject "style" / "FillForegroundColor" "ROSE" STR; json iobject "style" / "FillForegroundColor" "ROYAL_BLUE" STR; json iobject "style" / "FillForegroundColor" "SEA_GREEN" STR; json iobject "style" / "FillForegroundColor" "SKY_BLUE" STR; json iobject "style" / "FillForegroundColor" "TAN" STR; json iobject "style" / "FillForegroundColor" "TEAL" STR; json iobject "style" / "FillForegroundColor" "TURQUOISE" STR; json iobject "style" / "FillForegroundColor" "VIOLET" STR; json iobject "style" / "FillForegroundColor" "WHITE" STR; json iobject "style" / "FillForegroundColor" "YELLOW" STR; json iobject "style" / "FillBackgroundColor" "AQUA" STR; json iobject "style" / "FillBackgroundColor" "AUTOMATIC" STR; json iobject "style" / "FillBackgroundColor" "BLACK" STR; json iobject "style" / "FillBackgroundColor" "BLUE" STR; json iobject "style" / "FillBackgroundColor" "BLUE_GREY" STR; json iobject "style" / "FillBackgroundColor" "BRIGHT_GREEN" STR; json iobject "style" / "FillBackgroundColor" "BROWN" STR; json iobject "style" / "FillBackgroundColor" "CORAL" STR; json iobject "style" / "FillBackgroundColor" "CORNFLOWER_BLUE" STR; json iobject "style" / "FillBackgroundColor" "DARK_BLUE" STR; json iobject "style" / "FillBackgroundColor" "DARK_GREEN" STR; json iobject "style" / "FillBackgroundColor" "DARK_RED" STR; json iobject "style" / "FillBackgroundColor" "DARK_TEAL" STR; json iobject "style" / "FillBackgroundColor" "DARK_YELLOW" STR; json iobject "style" / "FillBackgroundColor" "GOLD" STR; json iobject "style" / "FillBackgroundColor" "GREEN" STR; json iobject "style" / "FillBackgroundColor" "GREY_25_PERCENT" STR; json iobject "style" / "FillBackgroundColor" "GREY_40_PERCENT" STR; json iobject "style" / "FillBackgroundColor" "GREY_50_PERCENT" STR; json iobject "style" / "FillBackgroundColor" "GREY_80_PERCENT" STR; json iobject "style" / "FillBackgroundColor" "INDIGO" STR; json iobject "style" / "FillBackgroundColor" "LAVENDER" STR; json iobject "style" / "FillBackgroundColor" "LEMON_CHIFFON" STR; json iobject "style" / "FillBackgroundColor" "LIGHT_BLUE" STR; json iobject "style" / "FillBackgroundColor" "LIGHT_CORNFLOWER_BLUE" STR; json iobject "style" / "FillBackgroundColor" "LIGHT_GREEN" STR; json iobject "style" / "FillBackgroundColor" "LIGHT_ORANGE" STR; json iobject "style" / "FillBackgroundColor" "LIGHT_TURQUOISE" STR; json iobject "style" / "FillBackgroundColor" "LIGHT_YELLOW" STR; json iobject "style" / "FillBackgroundColor" "LIME" STR; json iobject "style" / "FillBackgroundColor" "MAROON" STR; json iobject "style" / "FillBackgroundColor" "OLIVE_GREEN" STR; json iobject "style" / "FillBackgroundColor" "ORANGE" STR; json iobject "style" / "FillBackgroundColor" "ORCHID" STR; json iobject "style" / "FillBackgroundColor" "PALE_BLUE" STR; json iobject "style" / "FillBackgroundColor" "PINK" STR; json iobject "style" / "FillBackgroundColor" "PLUM" STR; json iobject "style" / "FillBackgroundColor" "RED" STR; json iobject "style" / "FillBackgroundColor" "ROSE" STR; json iobject "style" / "FillBackgroundColor" "ROYAL_BLUE" STR; json iobject "style" / "FillBackgroundColor" "SEA_GREEN" STR; json iobject "style" / "FillBackgroundColor" "SKY_BLUE" STR; json iobject "style" / "FillBackgroundColor" "TAN" STR; json iobject "style" / "FillBackgroundColor" "TEAL" STR; json iobject "style" / "FillBackgroundColor" "TURQUOISE" STR; json iobject "style" / "FillBackgroundColor" "VIOLET" STR; json iobject "style" / "FillBackgroundColor" "WHITE" STR; json iobject "style" / "FillBackgroundColor" "YELLOW" STR; excel cell format "excelId" "sheet1" 1 1 "@" (json doc "style")
mentdb
1

excel close <excelId>

Description

    Close an Excel document.

Parameters

    excelId:   The excel id - string - required
admin
excel close "excelId"
mentdb
1

excel close_all

Description

    Close all Excel documents.

admin
excel close_all
mentdb
1

excel build_in_format

Description

    Show all build in format.

admin
excel build_in_format
mentdb
[
"General",
"0",
"0.00",
"#,##0",
"#,##0.00",
"\"$\"#,##0_);(\"$\"#,##0)",
"\"$\"#,##0_);[Red](\"$\"#,##0)",
"\"$\"#,##0.00_);(\"$\"#,##0.00)",
"\"$\"#,##0.00_);[Red](\"$\"#,##0.00)",
"0%",
"0.00%",
"0.00E+00",
"# ?/?",
"# ??/??",
"m/d/yy",
"d-mmm-yy",
"d-mmm",
"mmm-yy",
"h:mm AM/PM",
"h:mm:ss AM/PM",
"h:mm",
"h:mm:ss",
"m/d/yy h:mm",
"reserved-0x17",
"reserved-0x18",
"reserved-0x19",
"reserved-0x1A",
"reserved-0x1B",
"reserved-0x1C",
"reserved-0x1D",
"reserved-0x1E",
"reserved-0x1F",
"reserved-0x20",
"reserved-0x21",
"reserved-0x22",
"reserved-0x23",
"reserved-0x24",
"#,##0_);(#,##0)",
"#,##0_);[Red](#,##0)",
"#,##0.00_);(#,##0.00)",
"#,##0.00_);[Red](#,##0.00)",
"_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)",
"_(\"$\"* #,##0_);_(\"$\"* (#,##0);_(\"$\"* \"-\"_);_(@_)",
"_(* #,##0.00_);_(* (#,##0.00);_(* \"-\"??_);_(@_)",
"_(\"$\"* #,##0.00_);_(\"$\"* (#,##0.00);_(\"$\"* \"-\"??_);_(@_)",
"mm:ss",
"[h]:mm:ss",
"mm:ss.0",
"##0.0E+0",
"@"
]




© 2012 - 2019 - MentDB.