# GC.Spread.Sheets.HorizontalAlign

## Content

# Enumeration: HorizontalAlign

[Spread](../modules/GC.Spread).[Sheets](../modules/GC.Spread.Sheets).HorizontalAlign

Specifies the horizontal alignment.

**`example`**
```javascript
//This example uses the HorizontalAlign type.
var style = new GC.Spread.Sheets.Style();
style.font = "8pt Arial";
style.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
style.vAlign = GC.Spread.Sheets.VerticalAlign.center;
activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
activeSheet.getCell(1,1).value("B2");
```

## Table of contents

### Enumeration members

- [center](GC.Spread.Sheets.HorizontalAlign#center)
- [centerContinuous](GC.Spread.Sheets.HorizontalAlign#centercontinuous)
- [distributed](GC.Spread.Sheets.HorizontalAlign#distributed)
- [general](GC.Spread.Sheets.HorizontalAlign#general)
- [left](GC.Spread.Sheets.HorizontalAlign#left)
- [right](GC.Spread.Sheets.HorizontalAlign#right)

## Enumeration members

### <a id="center" name="center"></a> center

• **center** = `1`

 Indicates that the cell content is centered.

___

### <a id="centercontinuous" name="centercontinuous"></a> centerContinuous

• **centerContinuous** = `4`

 Indicates that the cell content is center across selection.

___

### <a id="distributed" name="distributed"></a> distributed

• **distributed** = `5`

 Indicates that each 'word' in each line of text inside the cell is evenly distributed across the width of the cell, with flush right and left margins.

___

### <a id="general" name="general"></a> general

• **general** = `3`

 Indicates that the horizontal alignment is based on the value type.

___

### <a id="left" name="left"></a> left

• **left** = `0`

 Indicates that the cell content is left-aligned.

___

### <a id="right" name="right"></a> right

• **right** = `2`

 Indicates that the cell content is right-aligned.
