Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert table request is not able to copy already created table and paste it in another doc #18690

Open
shubhh139 opened this issue Apr 2, 2024 · 0 comments
Assignees

Comments

@shubhh139
Copy link

`requests = [
Google::Apis::DocsV1::Request.new(
insert_table: {
table: table, (Its not working, is it the right syntax?)
end_of_segment_location: {
segment_id: ''
}
}
)
]

Execute the batch update request

batch_update_request = Google::Apis::DocsV1::BatchUpdateDocumentRequest.new(
requests: requests
)

response = docs_service.batch_update_document(doc_id, batch_update_request)

requests = [
Google::Apis::DocsV1::Request.new(
insert_table: {
table: table,
end_of_segment_location: {
segment_id: ''
}
}
)
]

request = Google::Apis::DocsV1::Request.new(
insert_table: {
rows: 3, # Number of rows in the table
columns: 4, # Number of columns in the table
end_of_segment_location: {
segment_id: "" # Segment ID if applicable
}
}
)

I tried the above code as well but instead of copying the existing table, it creates a new one with broader width and no data present`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants