<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>作成 | nujonoa_blog</title>
	<atom:link href="https://nujonoa.com/tag/%E4%BD%9C%E6%88%90/feed/" rel="self" type="application/rss+xml" />
	<link>https://nujonoa.com</link>
	<description>人生に役立つデータ集</description>
	<lastBuildDate>Tue, 26 Mar 2024 01:42:12 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://nujonoa.com/wp-content/uploads/2019/04/cropped-DSC00976-e1554456145409-32x32.jpg</url>
	<title>作成 | nujonoa_blog</title>
	<link>https://nujonoa.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>gasでセルの一覧からファイル一覧を作成する方法</title>
		<link>https://nujonoa.com/how-to-create-a-file-list-from-a-list-of-cells-with-gas/</link>
					<comments>https://nujonoa.com/how-to-create-a-file-list-from-a-list-of-cells-with-gas/#respond</comments>
		
		<dc:creator><![CDATA[nujonoa]]></dc:creator>
		<pubDate>Tue, 26 Mar 2024 01:42:09 +0000</pubDate>
				<category><![CDATA[GAS]]></category>
		<category><![CDATA[未分類]]></category>
		<category><![CDATA[フォルダ]]></category>
		<category><![CDATA[ファイル]]></category>
		<category><![CDATA[作成]]></category>
		<guid isPermaLink="false">https://nujonoa.com/?p=24169</guid>

					<description><![CDATA[gasでセルの一覧からファイル一覧を作成する方法 c列の名前一覧からファイルを作り、特定のフォルダに保存。d列にそのリンクを追加するプログラムです。 適宜シート名、フォルダID、列を変更して使用ください。]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">gasでセルの一覧からファイル一覧を作成する方法</h2>



<p>c列の名前一覧からファイルを作り、特定のフォルダに保存。<br>d列にそのリンクを追加するプログラムです。<br><br>適宜シート名、フォルダID、列を変更して使用ください。</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; title: ; notranslate">
function createSpreadsheetFromColumnC() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('Sheet1'); // シート名を適宜変更してください
  var folder = DriveApp.getFolderById('FolderID'); // フォルダIDを適宜変更してください

  var range = sheet.getRange('C:C'); // C列の範囲を取得
  var values = range.getValues(); // C列の値を取得

  for (var i = 0; i &lt; values.length; i++) {
    var fileName = values&#x5B;i]&#x5B;0];
    if (fileName !== '') { // ファイル名が空でない場合
      var newSpreadsheet = SpreadsheetApp.create(fileName); // ファイル名で新しいスプレッドシートを作成
      var fileId = newSpreadsheet.getId(); // 新しいスプレッドシートのIDを取得

      // 新しいスプレッドシートの親フォルダを変更して移動
      var file = DriveApp.getFileById(fileId); // 新しいスプレッドシートを取得
      var newFile = file.moveTo(folder); // 新しいスプレッドシートを指定のフォルダに移動
      
      // スプレッドシートのリンクを取得してD列に書き込む
      var spreadsheetLink = SpreadsheetApp.openById(newFile.getId()).getUrl();
      sheet.getRange('D' + (i + 1)).setValue(spreadsheetLink);
    }
  }
}

</pre></div>]]></content:encoded>
					
					<wfw:commentRss>https://nujonoa.com/how-to-create-a-file-list-from-a-list-of-cells-with-gas/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
