<?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: Viktor H. Morales</title>
    <description>The latest articles on DEV Community by Viktor H. Morales (@viktormorales).</description>
    <link>https://dev.to/viktormorales</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%2F736352%2F56360d63-bbc4-49cb-8dc6-7d1f7d6f5031.jpeg</url>
      <title>DEV Community: Viktor H. Morales</title>
      <link>https://dev.to/viktormorales</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/viktormorales"/>
    <language>en</language>
    <item>
      <title>Export spreadsheet data to a Google presentation</title>
      <dc:creator>Viktor H. Morales</dc:creator>
      <pubDate>Wed, 25 Jun 2025 17:47:53 +0000</pubDate>
      <link>https://dev.to/viktormorales/export-spreadsheet-data-to-a-google-presentation-2m2b</link>
      <guid>https://dev.to/viktormorales/export-spreadsheet-data-to-a-google-presentation-2m2b</guid>
      <description>&lt;p&gt;In order to avoid human error and optimize the workflow at the hotel reception where I work, I developed an application that allows exporting data from a spreadsheet (Google Sheets) to a Google presentation (Google Slides).&lt;/p&gt;

&lt;p&gt;🇪🇸 Read this article in Spanish on my blog: &lt;a href="https://viktormorales.com/diseno-y-desarrollo-web/exportar-datos-de-hoja-de-calculo-a-una-presentacion-de-google/" rel="noopener noreferrer"&gt;viktormorales.com&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  In this article
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Export data to a Google Slides presentation from a Google spreadsheet sheet&lt;/li&gt;
&lt;li&gt;Create a PDF from the Google Slides presentation&lt;/li&gt;
&lt;li&gt;Save the PDF on a folder in Google Drive&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🤔 The Problem
&lt;/h3&gt;

&lt;p&gt;We use a Google Sheets document to record information about guests who will use the hotel’s spa day service. Since the voucher is valid for 15 days, we also needed a column that calculates the voucher’s expiration date.&lt;/p&gt;

&lt;p&gt;This information then had to be transcribed (copy/paste) into a separate document that has a predefined design.&lt;/p&gt;

&lt;p&gt;After that, the document had to be exported as a PDF to be sent to the customer.&lt;/p&gt;

&lt;p&gt;Among these steps, the copy/paste moment was especially critical, as we could accidentally copy incorrect information — or even make mistakes calculating the expiration date manually.&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 The Solution
&lt;/h3&gt;

&lt;p&gt;I created a Google Apps Script that allows the following steps to be done automatically with the click of a button:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Populates a Google Slides template with data from the spreadsheet.&lt;/li&gt;
&lt;li&gt;Exports the Google Slides file as a PDF and saves it to a specific folder in Google Drive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Spreadsheet
&lt;/h3&gt;

&lt;p&gt;This sheet contains the relevant information, including issue date, expiration date (calculated automatically with a formula: issue date + 15 days), guest name, and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ksqnxsgrobt6mvzog91.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ksqnxsgrobt6mvzog91.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the top menu, there’s an option labeled &lt;strong&gt;"Create Voucher"&lt;/strong&gt; — clicking it automatically exports the &lt;strong&gt;latest row&lt;/strong&gt; in the spreadsheet to a PDF.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Presentation
&lt;/h3&gt;

&lt;p&gt;This is the voucher template created using Google Slides.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu80wi945ervoy3x6vl5j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu80wi945ervoy3x6vl5j.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The template has two text fields with the variables &lt;code&gt;{{NAME}}&lt;/code&gt; and &lt;code&gt;{{DUE_DATE}}&lt;/code&gt;, which are automatically filled in using data from the spreadsheet.&lt;/p&gt;

&lt;p&gt;The script replaces those placeholders and saves the final file as a PDF in a Drive folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo23te4xwuzsraghbg4gq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo23te4xwuzsraghbg4gq.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Final Voucher
&lt;/h3&gt;

&lt;p&gt;This is the resulting PDF voucher, complete with the guest’s name and the expiration date automatically calculated from the spreadsheet:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdbi4um6h2j0ksu27w91.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdbi4um6h2j0ksu27w91.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Code
&lt;/h3&gt;

&lt;p&gt;Without further ado, here is the script:&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Make sure to update the IDs for the spreadsheet and the presentation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://jsfiddle.net/viktormorales/smgqtupj/embedded/js//embedded//dark" width="100%" height="600"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>appscript</category>
      <category>google</category>
      <category>spreadsheet</category>
    </item>
    <item>
      <title>JavaScript: Create an Excel file from another Excel file</title>
      <dc:creator>Viktor H. Morales</dc:creator>
      <pubDate>Sun, 30 Oct 2022 20:53:27 +0000</pubDate>
      <link>https://dev.to/viktormorales/javascript-create-an-excel-file-from-another-excel-file-2441</link>
      <guid>https://dev.to/viktormorales/javascript-create-an-excel-file-from-another-excel-file-2441</guid>
      <description>&lt;p&gt;Why should I want to create an Excel file from another Excel file? &lt;/p&gt;

&lt;p&gt;If you work with tons of Excel files every day and need to share some information to some people/agency/company and other information to some other people/agency/company and you are tired of wasting time copying and pasting... here's how you can take advantage of web development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using this HTML Form:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T1Fr-1Xq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ixnqefgrn7tcg3idxnu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T1Fr-1Xq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ixnqefgrn7tcg3idxnu.png" alt="HTML Form" width="880" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Go from this:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KmxzTslj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8sgto0n0860aviun9d9n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KmxzTslj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8sgto0n0860aviun9d9n.png" alt="Original Excel file" width="770" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  To this:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3bpnUXov--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/admsr23ibk57v7vp8iri.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3bpnUXov--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/admsr23ibk57v7vp8iri.png" alt="Excel file generated by the HTML Form" width="880" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I won't make a whole speech about this as I am way better demonstrating results than wasting words. Enjoy!&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/viktormorales/embed/bGKVagb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>HTML Input: add plus and minus buttons with JavaScript (or jQuery)</title>
      <dc:creator>Viktor H. Morales</dc:creator>
      <pubDate>Thu, 28 Jul 2022 02:22:00 +0000</pubDate>
      <link>https://dev.to/viktormorales/html-input-add-plus-and-minus-buttons-with-javascript-or-jquery-h2c</link>
      <guid>https://dev.to/viktormorales/html-input-add-plus-and-minus-buttons-with-javascript-or-jquery-h2c</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This is a translation from my spanish version written on my personal blog: &lt;a href="https://viktormorales.com/diseno-y-desarrollo-web/html-input-agregar-botones-mas-y-menos-con-javascript/"&gt;https://viktormorales.com/diseno-y-desarrollo-web/html-input-agregar-botones-mas-y-menos-con-javascript/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A customer asked me to add plus (+) and minus (-) button before and after an HTML Input of type "number" for his WooCommerce store.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add plus and minus buttons with jQuery
&lt;/h2&gt;

&lt;p&gt;As the customer website is running on WordPress and as this platform has the library jQuery on it, I developed a solution using that library:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/viktormorales/embed/rNdyjzJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Add plus and minus buttons with JavaScript
&lt;/h2&gt;

&lt;p&gt;So I was happy with the result but I wanted to code it in plain JS as well:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/viktormorales/embed/LYdyoLb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;🍻 Cheers!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>jquery</category>
      <category>html</category>
      <category>webdev</category>
    </item>
    <item>
      <title>HTML + CSS +JS = Aplicación funcional</title>
      <dc:creator>Viktor H. Morales</dc:creator>
      <pubDate>Mon, 27 Dec 2021 02:01:00 +0000</pubDate>
      <link>https://dev.to/viktormorales/html-css-js-aplicacion-funcional-441l</link>
      <guid>https://dev.to/viktormorales/html-css-js-aplicacion-funcional-441l</guid>
      <description>&lt;p&gt;🎉 &lt;strong&gt;En mi primer posteo en esta comunidad&lt;/strong&gt; quería compartir &lt;em&gt;una aplicación funcional desarrollada en HTML, CSS &amp;amp; JS&lt;/em&gt; para el Hotel en el cual trabajo en mi ciudad Ushuaia, Argentina.&lt;/p&gt;

&lt;p&gt;🤖 Una de las &lt;em&gt;tareas repetitivas que quería automatizar&lt;/em&gt; durante mi turno es la de &lt;strong&gt;enviar mensajes con novedades a los huéspedes del hotel&lt;/strong&gt;. Para ello desarrollé esta mini aplicación que ya tiene información y un diseño predeterminado. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Actualmente esos mensajes se imprimen en papel y se envían departamento por departamento, práctica que de a poco estamos reemplazando por mensajes por WhatsApp. Pero eso es otra historia.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;En &lt;a href="https://codepen.io"&gt;codepen.io&lt;/a&gt; dejo el código completo y cada uno con sus comentarios para que lo analicen.&lt;/p&gt;

&lt;p&gt;Usé:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML para la maquetación del diseño&lt;/li&gt;
&lt;li&gt;CSS y &lt;a href="https://getbootstrap.com/"&gt;Bootstrap&lt;/a&gt; para &lt;em&gt;ponerlo bonito&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;JS para que cuando se haga click en el botón "Continuar", muestre la página de impresión y procese la información del formulario.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/viktormorales/embed/JjrMPRR?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Esta aplicación es la base de una aplicación un poco mayor, ya que &lt;strong&gt;la idea final es que&lt;/strong&gt; cuando se hace click en "IMPRIMIR":&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imprima el mensaje,&lt;/li&gt;
&lt;li&gt;Lo guarde en una carpeta,&lt;/li&gt;
&lt;li&gt;Y también guarde el registro en una base de datos para consultas posteriores.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🙋‍♂️ Este artículo es un servicio para aquellos lectores que están iniciando en estas tecnologías puedan ver un uso sencillo y aplicable a la vida real.&lt;/p&gt;

&lt;p&gt;¡Saludos!&lt;/p&gt;

</description>
      <category>html</category>
      <category>javascript</category>
      <category>css</category>
    </item>
  </channel>
</rss>
