When the user clicks a button, you would loop through the rows of the local data source and create a row in the Google Sheet with the data from the local data source. It will be a slow process depending on the size of the database.
See this example: How to send local db components to google sheets? - #4 by muneer
Post a screenshot of your blocks if you’re having trouble getting that to work.