Adding back a base column for sheet creation.

This commit is contained in:
mike12345567 2023-03-13 18:10:35 +00:00
parent 4eba548e93
commit 65ada7f8b2
1 changed files with 4 additions and 1 deletions

View File

@ -308,9 +308,12 @@ class GoogleSheetsIntegration implements DatasourcePlus {
}
async createTable(name?: string) {
if (!name) {
throw new Error("Must provide name for new sheet.")
}
try {
await this.connect()
return await this.client.addSheet({ title: name, headerValues: [] })
return await this.client.addSheet({ title: name, headerValues: [name] })
} catch (err) {
console.error("Error creating new table in google sheets", err)
throw err