Skip to content

Commit

Permalink
taskpaneの修正
Browse files Browse the repository at this point in the history
  • Loading branch information
st-func committed Feb 18, 2024
1 parent 2ba2800 commit f6de7f9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 58 deletions.
76 changes: 41 additions & 35 deletions src/taskpane/taskpane.html
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. -->
<!-- This file shows how to design a first-run page that provides a welcome screen to the user about the features of the add-in. -->

<!DOCTYPE html>
<html>

<head>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Contoso Task Pane Add-in</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>st-funcについて</title>

<!-- Office JavaScript API -->
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>

<!-- For more information on Fluent UI, visit https://developer.microsoft.com/fluentui#/. -->
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/11.0.0/css/fabric.min.css"/>
<link
rel="stylesheet"
href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/11.0.0/css/fabric.min.css"
/>

<!-- Template styles -->
<link href="taskpane.css" rel="stylesheet" type="text/css" />
</head>
</head>

<body class="ms-font-m ms-welcome ms-Fabric">
<body class="ms-font-m ms-welcome ms-Fabric">
<header class="ms-welcome__header ms-bgColor-neutralLighter">
<img width="90" height="90" src="../../assets/logo-filled.png" alt="Contoso" title="Contoso" />
<h1 class="ms-font-su">Welcome</h1>
<img width="90" height="90" src="../../assets/logo-filled.png" alt="st-func" title="st-func" />
<h1 class="ms-font-su">st-func</h1>
</header>
<section id="sideload-msg" class="ms-welcome__main">
<h2 class="ms-font-xl">Please <a target="_blank" href="https://learn.microsoft.com/office/dev/add-ins/testing/test-debug-office-add-ins#sideload-an-office-add-in-for-testing">sideload</a> your add-in to see app body.</h2>
<h2 class="ms-font-xl">
これはst-funcアドインのパネルです。ここからは利用できません。<br />
st-funcアドインを利用する場合は
<a href="https://st-func.main.jp/docs/st-func-addin/">マニュアル</a>
を参照し、インストール方法をご確認下さい。
</h2>
</section>
<main id="app-body" class="ms-welcome__main" style="display: none;">
<h2 class="ms-font-xl"> Discover what Office Add-ins can do for you today! </h2>
<ul class="ms-List ms-welcome__features">
<li class="ms-ListItem">
<i class="ms-Icon ms-Icon--Ribbon ms-font-xl"></i>
<span class="ms-font-m">Achieve more with Office integration</span>
</li>
<li class="ms-ListItem">
<i class="ms-Icon ms-Icon--Unlock ms-font-xl"></i>
<span class="ms-font-m">Unlock features and functionality</span>
</li>
<li class="ms-ListItem">
<i class="ms-Icon ms-Icon--Design ms-font-xl"></i>
<span class="ms-font-m">Create and visualize like a pro</span>
</li>
</ul>
<p class="ms-font-l">Modify the source files, then click <b>Run</b>.</p>
<div role="button" id="run" class="ms-welcome__action ms-Button ms-Button--hero ms-font-xl">
<span class="ms-Button-label">Run</span>
</div>
<main id="app-body" class="ms-welcome__main" style="display: none">
<h2 class="ms-font-xl">st-funcアドインについて</h2>
<ul class="ms-List ms-welcome__features">
<li class="ms-ListItem">
<i class="ms-Icon ms-Icon--Calculator ms-font-xl"></i>
<span class="ms-font-m">このアドインはExcelで建築構造設計を行う際に便利なカスタム関数を集めたものです。</span>
</li>
<li class="ms-ListItem">
<i class="ms-Icon ms-Icon--Calculator ms-font-xl"></i>
<span class="ms-font-m">使い方、計算内容などのマニュアルについては
<a href="https://github.com/st-func/st_func_docs/blob/main/st_func_addin/index.md" target="_blank">こちら</a>
を参照してください</span>
</li>
<li class="ms-ListItem">
<i class="ms-Icon ms-Icon--Calculator ms-font-xl"></i>
<span class="ms-font-m">このアドインはオープンソースです。ソースコードについては
<a href="https://github.com/st-func/st_func_addin" target="_blank">こちら</a>
を参照してください。開発に協力してくれる方大歓迎です。</span>
</li>
<li class="ms-ListItem">
<i class="ms-Icon ms-Icon--Warning ms-font-xl"></i>
<span class="ms-font-m">本プログラムは開発中です。また、プログラム利用により設計に不具合等が生じても作者は責任を負いません。計算結果については自己判断のもとご利用ください。</span>
</li>
</main>
</body>

</body>
</html>
23 changes: 0 additions & 23 deletions src/taskpane/taskpane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,4 @@
Office.onReady(() => {
document.getElementById("sideload-msg").style.display = "none";
document.getElementById("app-body").style.display = "flex";
document.getElementById("run").onclick = run;
});

export async function run() {
try {
await Excel.run(async (context) => {
/**
* Insert your Excel code here
*/
const range = context.workbook.getSelectedRange();

// Read the range address
range.load("address");

// Update the fill color
range.format.fill.color = "yellow";

await context.sync();
console.log(`The range address was ${range.address}.`);
});
} catch (error) {
console.error(error);
}
}

0 comments on commit f6de7f9

Please sign in to comment.