全て
| カテゴリ未分類
| 通常
| 数学
| 投資
| 副業
| 転職・就職
| ブログ
| 株Stock
| VBA
| SharePoint
| REST API
| RenderListDataAsStream
| PowerAutomateDesktop
| Graph API
| PowerApps
| PowerAutomate
| PowerFx
| OfficeScriptオフィススクリプト
| PowerAutomate日時Excel日時相互関係
| PowerShell
| Dataverse
| UiPath
| OneDrive
| LINQ
| VB.NET
| C#.NET
| WPFC#.NET
| Git
function sortTableByColumn1() { // テーブルが含まれるシートを取得 let sheet = Excel.run(function(context) { let currentWorksheet = context.workbook.worksheets.getActiveWorksheet(); return currentWorksheet; }); // ソート対象のテーブルの名前を指定 let tableName = "Table1"; // Excelの実行コンテキストで操作を実行 Excel.run(function(context) { // テーブルを取得 let table = context.workbook.tables.getItem(tableName); // 列1を基準に昇順でソート table.sort.apply([{key: 0, ascending: true}]); // 変更をコミット return context.sync(); }) .then(function() { console.log("列1でテーブルがソートされました。"); }) .catch(function(error) { console.log("エラーが発生しました: " + error); if (error instanceof OfficeExtension.Error) { console.log("エラーコード: " + error.code); console.log("エラーメッセージ: " + error.message); } }); } お気に入りの記事を「いいね!」で応援しよう
Last updated
2024.02.23 14:10:11
[OfficeScriptオフィススクリプト] カテゴリの最新記事
|