[]
        
(Showing Draft Content)

Right to Left Direction

SpreadJS allows you to change the worksheet’s orientation from Left-to-Right to Right-to-Left by setting the rightToLeft option of the Worksheet class to true.

The following image displays the worksheet in the Right-to-Left direction.


righttoleft


The following code sample shows how to use the worksheet option.

activeSheet.options.rightToLeft = true;

This property allows the worksheet's first column, row headers, and tab strip to appear on the right side, the cells are rendered from right to left, and a vertical scrollbar appears on the left side.

Other SpreadJS features that can be displayed in right to left direction as well are as follows:

  • The frozen line and their trailing frozen lines are painted on the left of the related column.

  • The row and column header and overflown data.

  • The drag indicators such as fill, drop, and merge are displayed on the bottom left side.

  • The direction of group layouts with row headers and column headers is changed.

  • The stacked headers are rendered from right to left.

  • The orientation of shapes such as connectors, groups, pictures, charts, etc. is changed.

  • The comment indicators appear on the top-left of the cell and filter buttons appear on the left of the cell.

  • The table filter button, table resize indicator, and validation button appear on the left of the cell.

  • The floating objects and the formula text box appear on the right of the worksheet.

Supported Behaviors

While enabling the rightToLeft option of the worksheet, the following behaviors are supported:

  • Navigating with the left key makes the active column bigger and navigation with the right key makes the active column smaller.

  • Selection of cells with left to right key.

  • The horizontal scrolling starts from right to left.

  • Column resizing, autofit, touch resize, touch zoom, and touch scroll are supported.

  • Printing and saving it in PDF format.

  • Import/export in .ssjson, .sjs, and .xlsx file formats.

Using Designer

You can also enable the Right-to-left option in a worksheet using SpreadJS Designer by accessing the General Sheet Settings in the Settings ribbon tab as shown below:


SheetSettings

Limitations

  • Shapes that cross the frozen area and viewport area, or cross viewport area and trailing freeze area, can be rendered in one direction.

  • RightToLeft option does not provide support to TableSheet, GanttSheet, and ReportSheet.