SpreadJS 13
SpreadJS Documentation / Developer's Guide / Features / Manage User Interface / Copy and Paste Styles
In This Topic
    Copy and Paste Styles
    In This Topic

    You can copy and paste styles from SpreadJS to Excel. You can also copy some styles from Excel to SpreadJS.

    Set the allowCopyPasteExcelStyle property to true to allow copying and pasting styles. For example (spread.options.allowCopyPasteExcelStyle = true;).

    The following table displays the style options that are copied from Excel and pasted into SpreadJS.

      Google Chrome Mozilla Firefox Microsoft Edge Microsoft Internet Explorer Safari on Mac Chrome on Mac
    backColor Supported Supported Supported Supported
    foreColor Supported Supported Supported Supported
    font Supported Supported Supported Supported
    vAlign

    top -> top

    center -> center

    bottom -> bottom

    justify -> bottom

    distributed -> bottom

    top -> center

    center -> center

    bottom -> center

    justify -> center

    distributed -> center

    top -> top

    center -> center

    bottom -> bottom

    justify -> bottom

    distributed -> bottom

    top -> top

    center -> center

    bottom -> bottom

    justify -> bottom

    distributed -> bottom

    hAlign

    left -> left

    center -> center

    right -> right

    general -> general

    fill -> general

    justify -> general

    center across selection -> general

    distributed -> general

    left -> left

    center -> left

    right -> left

    general -> left

    fill -> left

    justify -> left

    center across selection -> center

    distributed -> left

    left -> left

    center -> center

    right -> right

    general -> general

    fill -> general

    justify -> general

    center across selection -> general

    distributed -> general

    left -> left

    center -> center

    right -> right

    general -> general

    fill -> general

    justify -> general

    center across selection -> general

    distributed -> general

    borderLeft

    thin -> medium

    medium -> medium

    dashed -> mediumDashed

    dotted -> dotted

    thick -> medium

    double -> double

    hair -> None

    mediumDashed -> mediumDashed

    dashDot -> None

    mediumDashDot -> None

    dashDotDot -> None

    mediumDashDotDot -> None

    slantedDashDot -> None

    thin -> medium

    medium -> medium

    dashed -> mediumDashed

    dotted -> dotted

    thick -> medium

    double -> double

    hair -> None

    mediumDashed -> mediumDashed

    dashDot -> None

    mediumDashDot -> None

    dashDotDot -> None

    mediumDashDotDot -> None

    slantedDashDot -> None

    thin -> medium

    medium -> medium

    dashed -> mediumDashed

    dotted -> dotted

    thick -> medium

    double -> double

    hair -> None

    mediumDashed -> mediumDashed

    dashDot -> None

    mediumDashDot -> None

    dashDotDot -> None

    mediumDashDotDot -> None

    slantedDashDot -> None

    thin -> medium

    medium -> medium

    dashed -> mediumDashed

    dotted -> dotted

    thick -> medium

    double -> double

    hair -> None

    mediumDashed -> mediumDashed

    dashDot -> None

    mediumDashDot -> None

    dashDotDot -> None

    mediumDashDotDot -> None

    slantedDashDot -> None

    borderRight
    borderTop
    borderBottom
    textDecoration

    strikethrough -> lineThrough

    single -> underline

    double -> underline

    single accounting -> underline

    double accounting -> underline

    strikethrough -> lineThrough

    single -> underline

    double -> underline

    single accounting -> underline

    double accounting -> underline

    strikethrough -> lineThrough

    single -> underline

    double -> underline

    single accounting -> underline

    double accounting -> underline

    strikethrough -> lineThrough

    single -> underline

    double -> underline

    single accounting -> underline

    double accounting -> underline

    The following table displays the style options that are copied from SpreadJS and pasted to Excel.

      Chrome Firefox Edge Internet Explorer Safari on Mac Chrome on Mac
    backColor Supported Supported Not Supported Not Supported
    foreColor Supported Supported Not Supported Supported
    font Supported Supported Not Supported Supported
    vAlign

    top -> top

    center -> center

    bottom -> bottom

    top -> top

    center -> center

    bottom -> bottom

    Not Supported Not Supported
    hAlign

    left -> left

    center -> center

    right -> right

    general -> general

    left -> left

    center -> center

    right -> right

    general -> general

    Not Supported Not Supported
    borderLeft

    thin -> medium

    medium -> medium

    dashed -> mediumDashed

    dotted -> dotted

    thick -> medium

    double -> double

    hair -> dotted

    mediumDashed -> mediumDashed

    dashDot -> mediumDashed

    mediumDashDot -> mediumDashed

    dashDotDot -> mediumDashed

    mediumDashDotDot -> mediumDashed

    slantedDashDot -> mediumDashed

    thin -> medium

    medium -> medium

    dashed -> mediumDashed

    dotted -> dotted

    thick -> medium

    double -> double

    hair -> dotted

    mediumDashed -> mediumDashed

    dashDot -> mediumDashed

    mediumDashDot -> mediumDashed

    dashDotDot -> mediumDashed

    mediumDashDotDot -> mediumDashed

    slantedDashDot -> mediumDashed

    Not Supported Not Supported
    borderRight
    borderTop
    borderBottom
    textDecoration

    underline -> single

    lineThrough -> strikethrough

    overline -> None

    underline -> single

    lineThrough -> strikethrough

    overline -> None

    Not Supported

    underline -> single

    lineThrough -> strikethrough

    overline -> None

    See Also