How to create a tab? #3735
Unanswered
gorgulenkozxc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using
googleapis 155.0.1
and want to create a document with two tabs and write content in them.I found that there's a method
docs_v1.Resource$Documents.create
, which apparently accepts as a parameter object withrequestBody
of typeSchema$Document
which itself lets to specify thetabs
field. Unfortunately, however, the commentary on usage states the following:Indeed, the filled
tabs
field is ignored, and an empty document with the one default tab is created.Then I thought that if create didn't work, maybe
batchUpdate
would help me, but I was unsuccessful there too.batchUpdate
takes as its first parameter an object of typeParams$Resource$Documents$Batchupdate
, consisting ofdocumentId
andrequestBody
of typeSchema$BatchUpdateDocumentRequest
.Schema$BatchUpdateDocumentRequest
can contain only two parameters:requests
of typeSchema$Request
andwriteControl
Schema$WriteControl.
According to the description «A list of updates to apply to the document», it is the
requests
parameter that should be of interest to me.And that's where I stopped, not knowing what else to do.
Schema$Request
has the following options:Which of these methods creates a new tab???
insertText
of typeSchema$InsertTextRequest
haslocation
of typeSchema$Location
which hastabId
and the following comment...So if I don't provide it, text will just be placed in the first tab. If I do provide tabId, it's allowed only to be the same tabId as the first tab, meaning I just can't create new tab with text using
insertText
Beta Was this translation helpful? Give feedback.
All reactions