1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ShoheiAdvent Calendar 2022

Day 13

Kintoneのデータをスプレッドシートに出力する

Posted at

作るもの

image.png

事前準備

  • 対象のKintoneアプリでAPI Tokenを発行する。

ポイント

doGet で、HTMLファイルを返却する

const doGet = (param) => {
  const template = HtmlService.createTemplateFromFile('index')
  template.url = ScriptApp.getService().getUrl()
  return template.evaluate()
}

htmlにて、Javascriptを定義した別ファイルを読み込む

<?!= HtmlService.createHtmlOutputFromFile('client_js').getContent(); ?>

GoogleAppsScriptに定義したFunctionを実行する

google.script.run.withSuccessHandler((response) => {
  console.log(response)
}).withFailureHandler((e) => {
  console.log(e)
})
.exportKintoneAppData({
  param
})

動くものはこちら

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?