Skip to content

Instantly share code, notes, and snippets.

@bpwebs
bpwebs / #How to Save Websites' Contact Form Data to Google Sheets
Created January 3, 2025 16:48
How to Save Websites' Contact Form Data to Google Sheets
How to Save Websites' Contact Form Data to Google Sheets
bpwebs.com
@bpwebs
bpwebs / #User authentication in Google Apps Script web apps
Created September 30, 2024 15:45
User authentication in Google Apps Script web apps
User authentication in Google Apps Script web apps
#Display Google Sheets data on a website using Google Apps Script and JQuery DataTables
@bpwebs
bpwebs / #Creating Multi-Level Cascading Dropdowns in Google Apps Script Web Apps
Last active August 31, 2024 16:20
Creating Multi-Level Cascading Dropdowns in Google Apps Script Web Apps
Creating Multi-Level Cascading Dropdowns in Google Apps Script Web Apps
@bpwebs
bpwebs / #How to Create HTML Data Entry Forms in Google Sheets
Created April 14, 2024 12:41
#How to Create HTML Data Entry Forms in Google Sheets
How to Create HTML Data Entry Forms in Google Sheets
@bpwebs
bpwebs / Code.gs
Created November 18, 2023 19:37
Extract and combine first row of CSV files with Google Apps Script
function extractFirstRowCsvWithFilename() {
const folder = DriveApp.getFolderById("1MBaI_rGJ6t_loANMAvGpDbr2MeHZwxnn");
const files = folder.getFilesByType(MimeType.CSV);
let combinedData = [];
while (files.hasNext()) {
let file = files.next();
let filename = file.getName();
let csvData = Utilities.parseCsv(file.getBlob().getDataAsString());
@bpwebs
bpwebs / Code.gs
Last active November 21, 2023 01:02
Combine CSV Files with Google Apps Script - Prevent the column headers from being repeated in the merged CSV file
function combineCSVWithoutRepeatedHeaders() {
const folder = DriveApp.getFolderById("1MBaI_rGJ6t_loANMAvGpDbr2MeHZwxnn");
const files = folder.getFilesByType(MimeType.CSV);
let combinedData = [];
let firstFile = true;
while (files.hasNext()) {
let file = files.next();
let csvData = Utilities.parseCsv(file.getBlob().getDataAsString());
@bpwebs
bpwebs / Code.gs
Created November 13, 2023 00:52
Combine CSV files with Google Apps Script
function combineCsv() {
const folder = DriveApp.getFolderById("1MBaI_rGJ6t_loANMAvGpDbr2MeHZwxnn");
const files = folder.getFilesByType(MimeType.CSV);
let combinedData = [];
while(files.hasNext()){
let file = files.next();
let csvData = Utilities.parseCsv(file.getBlob().getDataAsString());
combinedData = combinedData.concat(csvData);
}
@bpwebs
bpwebs / Code.gs
Created November 7, 2023 19:17
Access the CSV files in Google Drive with Google Apps Script
function combineCsv() {
const folder = DriveApp.getFolderById("1mSJUg80NRhtorSBBOsJylbDYTDDmpHWY");
const files = folder.getFilesByType(MimeType.CSV);
//Use the files variable
}
@bpwebs
bpwebs / CSS.html
Last active November 5, 2024 22:08
Multi-Page Google Apps Script Web App
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">