<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: gDevTest</title>
    <description>The latest articles on DEV Community by gDevTest (@gdevtest).</description>
    <link>https://dev.to/gdevtest</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F935845%2F038eeb44-d80b-4f73-8397-266a7b944944.png</url>
      <title>DEV Community: gDevTest</title>
      <link>https://dev.to/gdevtest</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gdevtest"/>
    <language>en</language>
    <item>
      <title>How to Hide/unhide columns with google AppsScript</title>
      <dc:creator>gDevTest</dc:creator>
      <pubDate>Sun, 02 Oct 2022 04:50:02 +0000</pubDate>
      <link>https://dev.to/gdevtest/how-to-hideunhide-columns-with-google-appsscript-co9</link>
      <guid>https://dev.to/gdevtest/how-to-hideunhide-columns-with-google-appsscript-co9</guid>
      <description>&lt;p&gt;Hello,&lt;br&gt;
I'm a beginer in js &amp;amp; google apps script and trying to get this done to no avail...&lt;br&gt;
I've divided my google sheet in 3 working zones [Range1(E:I), Range2(J:N), Range3(O:S)]&lt;br&gt;
so, I'm trying to write a script to hide and unhide each range in the way that &lt;br&gt;
if Range1 is showing/unhidden, Range2 &amp;amp; Range3 should be hidden and so should it be for the other 2 ranges...&lt;br&gt;
The script I tried to write(see below) for Range1 returns no error; but won't do anything either&lt;/p&gt;

&lt;p&gt;Please your contribution and help will be apprciated...&lt;/p&gt;

&lt;p&gt;=============&lt;/p&gt;

&lt;p&gt;function hideRange1(){&lt;br&gt;
    var wb= SpreadsheetApp.getActiveSpreadsheet();&lt;br&gt;
    var sh= wb.getActiveSheet();&lt;br&gt;
    var range1= homesh.getActiveRange(E:I);&lt;/p&gt;

&lt;p&gt;if (range1.getA1Notation() !="E1:I") return;&lt;/p&gt;

&lt;p&gt;if(range1=="True"){&lt;br&gt;
    SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().hideColumns(10, 19);&lt;/p&gt;

&lt;p&gt;}&lt;br&gt;
  else if (range1 == "FALSE") {&lt;br&gt;
    SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().showColumns(10, 19);&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
