Last active
June 11, 2019 13:49
-
-
Save alexismp/48c6a515db407f5ae53d46b6be15e0a3 to your computer and use it in GitHub Desktop.
Cloud Function csv2sheet - Part 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {google} = require("googleapis"); | |
const {Storage} = require("@google-cloud/storage") | |
exports.csv2sheet = async (data, context) => { | |
var fileName = data.name; | |
// basic check that this is a *.csv file, etc... | |
if (!fileName.endsWith(".csv")) { | |
console.log("Not a .csv file, ignoring."); | |
return; | |
} | |
// define name of new sheet | |
const sheetName = fileName.slice(0, -4); | |
// TODO! | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment