|
5092 | 5092 | sumCell.format.autofitColumns();
|
5093 | 5093 | await context.sync();
|
5094 | 5094 | });
|
| 5095 | +'Excel.Range#clearOrResetContents:member(1)': |
| 5096 | + - >- |
| 5097 | + // Link to full sample: |
| 5098 | + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml |
| 5099 | + |
| 5100 | + |
| 5101 | + await Excel.run(async (context) => { |
| 5102 | + const sheet = context.workbook.worksheets.getActiveWorksheet(); |
| 5103 | + |
| 5104 | + // Get the second column in the table. |
| 5105 | + const range = sheet.getRange("FruitTable").getColumn(1); |
| 5106 | + |
| 5107 | + // Clear all the data from the second column. |
| 5108 | + range.clearOrResetContents(); |
| 5109 | + await context.sync(); |
| 5110 | + }); |
5095 | 5111 | 'Excel.Range#copyFrom:member(1)':
|
5096 | 5112 | - >-
|
5097 | 5113 | // Link to full sample:
|
|
5207 | 5223 | console.log(
|
5208 | 5224 | `Address: ${cellProperties.address}\nStyle: ${cellProperties.style}\nFill Color: ${cellProperties.format.fill.color}\nFont Color: ${cellProperties.format.font.color}`);
|
5209 | 5225 | });
|
| 5226 | +'Excel.Range#getColumn:member(1)': |
| 5227 | + - >- |
| 5228 | + // Link to full sample: |
| 5229 | + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml |
| 5230 | + |
| 5231 | + |
| 5232 | + await Excel.run(async (context) => { |
| 5233 | + const sheet = context.workbook.worksheets.getActiveWorksheet(); |
| 5234 | + |
| 5235 | + // Get the second column in the table. |
| 5236 | + const range = sheet.getRange("FruitTable").getColumn(1); |
| 5237 | + |
| 5238 | + // Change the boolean values to checkboxes. |
| 5239 | + range.control = { |
| 5240 | + type: Excel.CellControlType.checkbox |
| 5241 | + }; |
| 5242 | + await context.sync(); |
| 5243 | + }); |
5210 | 5244 | 'Excel.Range#getDependents:member(1)':
|
5211 | 5245 | - >-
|
5212 | 5246 | // Link to full sample:
|
|
5875 | 5909 | sheet.getRange("A1:R10").ungroup(Excel.GroupOption.byColumns);
|
5876 | 5910 | await context.sync();
|
5877 | 5911 | });
|
| 5912 | +'Excel.Range#values:member': |
| 5913 | + - >- |
| 5914 | + // Link to full sample: |
| 5915 | + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml |
| 5916 | + |
| 5917 | + |
| 5918 | + await Excel.run(async (context) => { |
| 5919 | + const sheet = context.workbook.worksheets.getActiveWorksheet(); |
| 5920 | + const range = sheet.getRange("B3"); |
| 5921 | + |
| 5922 | + range.values = [["TRUE"]]; |
| 5923 | + await context.sync(); |
| 5924 | + }); |
5878 | 5925 | 'Excel.Range#valuesAsJson:member':
|
5879 | 5926 | - >-
|
5880 | 5927 | // Link to full sample:
|
|
0 commit comments