-
Notifications
You must be signed in to change notification settings - Fork 63
/
excel.worksheetsingleclickedeventargs.yml
102 lines (92 loc) · 3.6 KB
/
excel.worksheetsingleclickedeventargs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
### YamlMime:TSType
name: Excel.WorksheetSingleClickedEventArgs
uid: 'excel!Excel.WorksheetSingleClickedEventArgs:interface'
package: excel!
fullName: Excel.WorksheetSingleClickedEventArgs
summary: Provides information about the left-clicked/tapped event and its related worksheet.
remarks: '\[ [API set: ExcelApi 1.10](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
type: interface
properties:
- name: address
uid: 'excel!Excel.WorksheetSingleClickedEventArgs#address:member'
package: excel!
fullName: address
summary: Gets the address that represents the cell which was left-clicked/tapped for a specific worksheet.
remarks: >-
\[ [API set: ExcelApi 1.10](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/30-events/event-worksheet-single-click.yaml
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getActiveWorksheet();
sheet.onSingleClicked.add((event) => {
return Excel.run((context) => {
console.log(`Click detected at ${event.address} (pixel offset from upper-left cell corner: ${event.offsetX}, ${event.offsetY})`);
return context.sync();
});
});
console.log("The worksheet click handler is registered.");
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'address: string;'
return:
type: string
- name: offsetX
uid: 'excel!Excel.WorksheetSingleClickedEventArgs#offsetX:member'
package: excel!
fullName: offsetX
summary: >-
The distance, in points, from the left-clicked/tapped point to the left (or right for right-to-left languages)
gridline edge of the left-clicked/tapped cell.
remarks: '\[ [API set: ExcelApi 1.10](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'offsetX: number;'
return:
type: number
- name: offsetY
uid: 'excel!Excel.WorksheetSingleClickedEventArgs#offsetY:member'
package: excel!
fullName: offsetY
summary: >-
The distance, in points, from the left-clicked/tapped point to the top gridline edge of the left-clicked/tapped
cell.
remarks: '\[ [API set: ExcelApi 1.10](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'offsetY: number;'
return:
type: number
- name: type
uid: 'excel!Excel.WorksheetSingleClickedEventArgs#type:member'
package: excel!
fullName: type
summary: Gets the type of the event.
remarks: '\[ [API set: ExcelApi 1.10](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'type: "WorksheetSingleClicked";'
return:
type: '"WorksheetSingleClicked"'
- name: worksheetId
uid: 'excel!Excel.WorksheetSingleClickedEventArgs#worksheetId:member'
package: excel!
fullName: worksheetId
summary: Gets the ID of the worksheet in which the cell was left-clicked/tapped.
remarks: '\[ [API set: ExcelApi 1.10](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'worksheetId: string;'
return:
type: string