You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/excel/excel-add-ins-worksheet-display.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,20 @@ Excel is often used for reporting scenarios where you want to share worksheet da
11
11
12
12
## Page layout and print settings
13
13
14
-
Add-ins have access to page layout settings at a worksheet level. These control how the sheet is printed. A `Worksheet` object has three layout-related properties: `horizontalPageBreaks`, `verticalPageBreaks`, `pageLayout`.
14
+
Add-ins have access to page layout settings at a worksheet level. These control how the sheet is printed. A `Worksheet` object has three layout-related properties: `horizontalPageBreaks`, `verticalPageBreaks`, and `pageLayout`.
15
15
16
-
`Worksheet.horizontalPageBreaks` and `Worksheet.verticalPageBreaks` are [PageBreakCollections](/javascript/api/excel/excel.pagebreakcollection). These are collections of [PageBreaks](/javascript/api/excel/excel.pagebreak), which specify ranges where manual page breaks are inserted. The following code sample adds a horizontal page break above row **21**.
16
+
`Worksheet.horizontalPageBreaks` and `Worksheet.verticalPageBreaks` are [PageBreakCollection](/javascript/api/excel/excel.pagebreakcollection) objects. These are collections of [PageBreak](/javascript/api/excel/excel.pagebreak) objects, which specify ranges where manual page breaks are inserted. The following code sample adds a horizontal page break before row **21**.
sheet.horizontalPageBreaks.add("A21:E21"); // The page break is added above this range.
21
+
sheet.horizontalPageBreaks.add("A21:E21"); // The page break precedes this range.
22
22
awaitcontext.sync();
23
23
});
24
24
```
25
25
26
-
`Worksheet.pageLayout` is a [PageLayout](/javascript/api/excel/excel.pagelayout) object. This object contains layout and print settings that are not dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area.
27
-
The following code sample centers the page (both vertically and horizontally), sets a title row that will be printed at the top of every page, and sets the printed area to a subsection of the worksheet.
26
+
`Worksheet.pageLayout` is a [PageLayout](/javascript/api/excel/excel.pagelayout) object. This object contains layout and print settings that aren't dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area.
27
+
The following code sample centers the page (both vertically and horizontally), sets a title row to be printed at the top of every page, and sets the printed area to a subsection of the worksheet.
> [!INCLUDE [Information about using preview APIs](../includes/using-excel-preview-apis.md)]
51
51
52
-
Data types can have an icon next to the value in the cell. When you have large tables with many data types, this can appear cluttered.
52
+
Data types can display an icon next to the value in the cell. When you have large tables with many data types, the icons may add visual clutter.
53
53
54
54
:::image type="content" source="../images/data-types-icon-table.png" alt-text="An Excel table with three data types showing the same icon next to each data type.":::
55
55
56
-
Use the [Worksheet.showDataTypeIcons](/javascript/api/excel/excel.worksheet#excel-excel-worksheet-showdatatypeicons-member) property to toggle data type icons on or off. For more information about data types, see [Overview of data types in Excel add-ins](excel-data-types-overview.md). The `showDataTypeIcons` property performs the same action as the user toggling data icons by using the **View** > **Data Type Icons** checkbox. The visibility settings for data type icons are saved with the worksheet and are also seen by anyone co-authoring at the time they are changed.
56
+
Use the [Worksheet.showDataTypeIcons](/javascript/api/excel/excel.worksheet#excel-excel-worksheet-showdatatypeicons-member) property to toggle data type icons on or off. For more information about data types and their icons, see [Overview of data types in Excel add-ins](excel-data-types-overview.md). The `showDataTypeIcons` property performs the same action as the user toggling data type icons by using the **View** > **Data Type Icons** checkbox. The visibility settings for data type icons are saved with the worksheet and are seen by anyone co-authoring at the time they are changed.
57
57
58
58
The following code sample shows how to turn off data type icons on a worksheet.
59
59
@@ -77,7 +77,7 @@ Gridlines are the faint lines that appear between cells on a worksheet. These ca
77
77
78
78
:::image type="content" source="../images/excel-gridlines.png" alt-text="An infographic where the gridlines are distracting.":::
79
79
80
-
Turn the gridlines on or off with the [Worksheet.showGridlines](/javascript/api/excel/excel.worksheet#excel-excel-worksheet-showgridlines-member) property. This is the same as using the **View** > **Gridlines** checkbox. The visibility settings for gridlines are saved with the worksheet and are also seen by anyone co-authoring at the time they are changed.
80
+
Turn the gridlines on or off with the [Worksheet.showGridlines](/javascript/api/excel/excel.worksheet#excel-excel-worksheet-showgridlines-member) property. This is the same as using the **View** > **Gridlines** checkbox in the Excel UI. The visibility settings for gridlines are saved with the worksheet and are seen by anyone co-authoring at the time they are changed.
81
81
82
82
The following example shows how to turn off gridlines on a worksheet.
83
83
@@ -98,7 +98,7 @@ Headings are the Excel row numbers that appear on the left side of the worksheet
98
98
99
99
:::image type="content" source="../images/excel-heading-label.png" alt-text="A spreadsheet section highlighting the column heading A and the row heading 2.":::
100
100
101
-
Turn the headings on or off with the [Worksheet.showHeadings](/javascript/api/excel/excel.worksheet#excel-excel-worksheet-showheadings-member) property. This is the same as using the **View** > **Headings** checkbox. The following example shows how to turn headings off on a worksheet.
101
+
Turn the headings on or off with the [Worksheet.showHeadings](/javascript/api/excel/excel.worksheet#excel-excel-worksheet-showheadings-member) property. This is the same as using the **View** > **Headings** checkbox in the Excel UI. The following example shows how to turn headings off on a worksheet.
0 commit comments