Skip to content

Instantly share code, notes, and snippets.

View thomasbachem's full-sized avatar

Thomas Bachem thomasbachem

View GitHub Profile
@thomasbachem
thomasbachem / fixRoundupFunctionForExcelExport.gs
Created May 20, 2016 10:07
Google Sheets: Script to fix ROUNDUP() to be compatible with Excel export
// Excel needs ROUNDUP() to always have a second argument while in Google Sheets it defaults to 0.
// This script adds the missing ";0" to any use of ROUNDUP() in the current spreadsheet.
function fixRoundupForExcel() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
// Go thru each sheet
var sheets = ss.getSheets();
for (var s = 0; s < sheets.length; s++) {
var sheet = sheets[s];
var range = sheet.getDataRange();
From: Email Tester <test@example.com>
To: 0e7f28b@emailtests.com
Subject: HTML Email Image Embedding Test
MIME-Version: 1.0
Date: Fri, 29 Nov 2013 11:07:39 +0100
Message-Id: <2013112911112939.89504.5@example.com>
Content-Type: multipart/mixed; boundary="2013112911112939:89504:2"
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
<?php
/**
* Uses a concat() statement to provide proper escaping of single
* and double quotes for XPath strings.
*
* @link http://kushalm.com/the-perils-of-xpath-expressions-specifically-escaping-quotes
* @param string $value
* @return string
*/