<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Sheets on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/sheets/</link>
    <description>Recent content in Sheets on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo -- 0.147.8</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #213243b1d6e8932079e09227d3f3ed0c806cd0c9</copyright>
    <lastBuildDate>Thu, 05 Jan 2023 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/sheets/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Importing a Sitemap XML into Google Sheets</title>
      <link>https://www.hascode.com/importing-a-sitemap-xml-into-google-sheets/</link>
      <pubDate>Thu, 05 Jan 2023 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/importing-a-sitemap-xml-into-google-sheets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_goal&#34;&gt;The Goal&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short article, we want to import data from an existing sitemap XML file into a new Google Sheet document.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The sheet must pull the sitemap via HTTP protocol and extract all the URLs from the sitemap and insert them. into the sheet.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_implementation&#34;&gt;Implementation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now let’s implement it .. it only takes 1 minute …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For demonstration purpose, I’m going to use the sitemap from my old blog, to be found at &lt;code&gt;&lt;a href=&#34;https://www.hascode.com/sitemap.xml&#34; class=&#34;bare&#34;&gt;https://www.hascode.com/sitemap.xml&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Google Docs Snippets</title>
      <link>https://www.hascode.com/google-docs-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/google-docs-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_importing_xml_data_in_google_sheets&#34;&gt;Importing XML Data in Google Sheets&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use the &lt;a href=&#34;https://support.google.com/docs/answer/3093342?hl=en&#34;&gt;XMLIMPORT&lt;/a&gt; function&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The syntax is &lt;code&gt;XMLIMPORT(&amp;#34;url&amp;#34;, &amp;#34;xpath&amp;#34;)&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. for importing an XML sitemap&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;=IMPORTXML(&amp;#34;https://www.hascode.com/sitemap.xml&amp;#34;, &amp;#34;//\*[local-name()=&amp;#39;url&amp;#39;]/*[local-name()=&amp;#39;loc&amp;#39;]&amp;#34;)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_select_the_preceding_cell_in_google_sheets&#34;&gt;Select the preceding cell in Google Sheets&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;=INDIRECT(ADDRESS(ROW()-1,COLUMN())&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_a_todo_list_counter_in_google_sheets&#34;&gt;Create a Todo List Counter in Google Sheets&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Each empty cell is a todo, each filled cell is done.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That allows us the following output, that counts all preceding cells of each type:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;=&amp;#34;Done: &amp;#34;&amp;amp;(COUNTA(B3:INDIRECT(ADDRESS(ROW()-1,COLUMN())))&amp;amp;&amp;#34; Todo: &amp;#34; &amp;amp;COUNTIF(B3:INDIRECT(ADDRESS(ROW()-1,COLUMN())),&amp;#34;&amp;#34;))&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This outputs a label like &amp;#34;Done: 35 Todo: 142&amp;#34;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
