convert

Converting Google Spreadsheet to HTML Table using Google Apps Script

Gists This is a sample script for converting Google Spreadsheet to an HTML table using Google Apps Script. There is the case that it is required to convert a sheet in a Google Spreadsheet to an HTML table. For example, there might be a situation that a sheet in a Google Spreadsheet is sent as an email including an HTML table. And, there might be a situation in which a sheet in a Google Spreadsheet is published to an HTML page including the converted HTML table.

Simply Converting HTML to Plain Text using Google Apps Script

Gists This is a sample script for simply converting HTML to plain text using Google Apps Script. Sample values HTML (input value) <div id="sample1">sample text1</div> <div id="sample2">sample text2</div> <ul id="sample3"> <li>sample list 1</li> <li>sample list 2</li> </ul> <table id="sample4"> <tbody> <tr> <td>a1</td> <td>b1</td> <td>c1</td> </tr> <tr> <td>a2</td> <td>b2</td> <td>c2</td> </tr> </tbody> </table> Text (output value) sample text1 sample text2 - sample list 1 - sample list 2 a1 b1 c1 a2 b2 c2 Sample script function myFunction() { const sampleHTML = `<div id="sample1">sample text1</div> <div id="sample2">sample text2</div> <ul id="sample3"> <li>sample list 1</li> <li>sample list 2</li> </ul> <table id="sample4"> <tbody> <tr> <td>a1</td> <td>b1</td> <td>c1</td> </tr> <tr> <td>a2</td> <td>b2</td> <td>c2</td> </tr> </tbody> </table>`; const temp = GmailApp.

Downloading Active Sheet in Google Spreadsheet as CSV and PDF file by Clicking Button

Gists This is a sample script for downloading the active sheet in Google Spreadsheet to the local PC as a CSV file and a PDF file when a button on the side bar and the dialog is clicked. This is created with Google Apps Script and HTML&Javascript. In this post, the script of the previous post was modified. Sample script Please create new Google Spreadsheet and copy and paste the following scripts to the script editor.

Converting Texts to Bold, Italic and Bold-Italic Types of Unicode using Google Apps Script

Gists This is a sample script for converting the texts to the bold, italic, bold-italic types, underline and strike through of the unicode using Google Apps Script. In the current stage, at Google Docs (Spreadsheet, Document, Slides and so on), the rich texts cannot be directly managed for all places using Google Apps Script. But there are the places which can use the bold, italic and bold-italic fonts with the unicode.

Downloading Google Spreadsheet as XLSX and PDF file by Clicking Button

Gists This is a sample script for downloading Google Spreadsheet to the local PC as a XLSX file and a PDF file when a button on the side bar and the dialog is clicked. This is created with Google Apps Script and HTML&Javascript. Sample script Please create new Google Spreadsheet and copy and paste the following scripts to the script editor. And please run openSidebar(). By this, the side bar is opened to the Spreadsheet.

Converting SVG Format to PNG Format using Google Apps Script

Gists This is a sample script for converting the SVG image data to PNG image data using Google Apps Script. Unfortunately, in the current stage, there are no methods for directly converting the SVG to PNG in Google Drive service. But it can be achieved by Drive API. The sample script is as follows. Before you use this, please enable Drive API at Advanced Google services. Sample script function myFunction() { const svgFileId = "###"; // Please set the fileId of the SVG file.

Converting Many Files to Google Docs using Google Apps Script

Gists This is a sample script for converting a lot of files to Google Docs (Spreadsheet, Document and Slides). Batch request can be used for converting files. In this sample script, the files are converted using the batch request. Batch request can request 100 API by one API call. This sample script uses the fetchAll method. So even if there are over 100 files, this script can process them. Sample script: Before you run the script, please set the variables at main().

Resumable Conversion from CSV File with Large Size (> 50 MB) to Several Spreadsheets by Splitting File

Gists Overview This is a sample script which can achieve the resumable conversion from the large CSV-file to several spreadsheets by splitting the CSV file using Google Apps Script (GAS). Description Is there a situation that you want to convert a CSV file with the large size (> 50 MB) to Spreadsheet? When such large CSV file is converted to Spreadsheet, you will experience the error. The reason is the size and/or also it may be due to the total cells (> 2,000,000 cells) of CSV file.

Uploading CSV File as Spreadsheet and Modifying Permissions using Golang

Gists This sample script is for uploading CSV file as Spreadsheet and modifying permissions using Golang. I think that the detail information of google-api-go-client is a bit little. The sample scripts are so little. It retrieves most information from only godoc and GitHub. So I publish such sample scripts here. If this is useful for you, I’m glad. Important points : Give mimeType of file that it wants to upload to options of Media(r io.

Interconversion Between Google Docs and Microsoft Docs

Gists Updated: January 22, 2023 This sample script is for the interconversion between Google Docs (document, spreadsheet and presentation) and Microsoft Docs (word, excel and powerpoint). The feature is to convert them without Advanced Google Services. Since Advanced Google Services is not used for this, if you publish your script with this script, you are not necessary to explain how to install Advanced Google Services. This script converts between Google Docs and Microsoft Docs using UrlFetchApp.