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
[Excel] (ExcelApi 1.14) Add getPrecedents API to existing sample (OfficeDev#564)
* Rename direct-precedents.yaml to precedents.yaml, update snippet with ExcelApi 1.14 getPrecedents API
* Update excel.xlsx with new precedents info
* Run yarn start
* Update samples/excel/42-range/precedents.yaml
Co-authored-by: Alex Jerabek <38896772+AlexJerabek@users.noreply.github.com>
Co-authored-by: Alex Jerabek <38896772+AlexJerabek@users.noreply.github.com>
Copy file name to clipboardExpand all lines: samples/excel/42-range/precedents.yaml
+51-23Lines changed: 51 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,20 @@
1
1
order: 13
2
-
id: excel-direct-precedents
3
-
name: Direct precedents
2
+
id: excel-precedents
3
+
name: Precedents
4
4
description: This sample shows how to find and highlight the precedents of the currently selected cell. Precedents are cells referenced by the formula in a cell.
/** Default helper for invoking an action and handling errors. */
128
-
async function tryCatch(callback) {
129
-
try {
130
-
await callback();
131
-
} catch (error) {
132
-
// Note: In a production add-in, you'd want to notify the user through your add-in's UI.
133
-
console.error(error);
134
-
}
135
-
}
136
149
language: typescript
137
150
template:
138
151
content: |-
139
152
<section class="ms-font-m">
140
-
<p>This sample shows how to find and highlight the precedents of the currently selected cell. Precedents are cells referenced by the formula in a cell.</p>
153
+
<p>This sample shows how to find and highlight the precedents of the currently selected cell. </p>
154
+
<p>Precedents are cells referenced by the formula in a cell. A formula can also reference a cell that contains a formula, which results in a series of precedents. A "direct precedent" is a cell directly referenced by the selected formula. This sample shows how to return both the direct precedents and all of the precedents.</p>
<button id="select-first-cell" class="ms-Button"> <span class="ms-Button-label">Select a cell with direct precedents on this worksheet</span> </button>
148
-
<button id="select-second-cell" class="ms-Button"> <span class="ms-Button-label">Select a cell with direct precedents across worksheets</span> </button>
149
-
<button id="get-direct-precedents" class="ms-Button"> <span class="ms-Button-label">Get direct precedents</span> </button>
0 commit comments