Adding back a base column for sheet creation.
This commit is contained in:
parent
4eba548e93
commit
65ada7f8b2
|
@ -308,9 +308,12 @@ class GoogleSheetsIntegration implements DatasourcePlus {
|
||||||
}
|
}
|
||||||
|
|
||||||
async createTable(name?: string) {
|
async createTable(name?: string) {
|
||||||
|
if (!name) {
|
||||||
|
throw new Error("Must provide name for new sheet.")
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await this.connect()
|
await this.connect()
|
||||||
return await this.client.addSheet({ title: name, headerValues: [] })
|
return await this.client.addSheet({ title: name, headerValues: [name] })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Error creating new table in google sheets", err)
|
console.error("Error creating new table in google sheets", err)
|
||||||
throw err
|
throw err
|
||||||
|
|
Loading…
Reference in New Issue