Export SQL Server data to Google Sheets

Google Sheets is a free, cloud-based spreadsheet application for creating, editing, and collaborating on spreadsheets online.

To export data to Google Sheets:

1. Open the Data Export wizard in one of these ways:

  • On the Start Page, select Data Pump > Export Data.

  • In Database Explorer, right-click the required database or server connection and select Tasks > Export Data.

  • In Database Explorer, right-click the required table or view and select Export Data.

  • On the menu bar, select Database > Tasks > Export Data.

  • In Data Editor, click Data Export icon or right-click in the grid and select Export Data. You can export either the selected rows or the entire table.

2. On the Export format page, select Google Sheets, then click Next.

Tip

Click Load Template to load export options from a template file if you saved it previously.

Note

To move between pages, click Next or select a page directly from the navigation pane on the left.

To return to the previous step and review or change your settings, click Back.

To close the wizard without saving your changes, click Cancel.

Export format

3. On the Source page, specify the connection details and select the table or view that you want to export, then click Next.

Note

The Source page is unavailable if you open the Data Export wizard from Data Editor.

3.1. In Connection, select the server connection for the database. You can also create a new connection or update an existing one.

Tip

To create or update a server connection:

1. In Connection, select Manage.

2. In the Connection Manager dialog, click New to create a connection or Edit to modify an existing one.

3. In the Database Connection Properties dialog, configure connection settings.

4. In the Connection Manager dialog, click OK to use the connection for the export.

3.2. In Database, select the database.

3.3. In Schema, select the appropriate database schema.

3.4. In the grid, select the required table or view.

Tip

To search for the required table or view, enter a search query in the search box.

Note

Google Sheets supports exporting only one table or view at a time.

Source

4. On the Output settings page, specify the Google Spreadsheet ID or URL to export the data, then click Next.

Output settings

5. In the browser window that opens, select your Google account and grant dbForge the required permissions. After approval, you’ll receive a confirmation email.

dbForge granted access

6. On the Options page, configure the output options for the exported data, then click Next.

6.1. In Start Cell, specify the cell to begin the export.

6.2. In Sheet, enter the sheet name for the exported data.

6.3. Optional: To display a table header, select Show table header.

Options

7. On the Data formats page, select the columns for export and specify their data formats, then click Next.

7.1. On the Columns tab, select the columns for export and check or edit their aliases and data types.

7.2. On the Formats tab, change the default format settings for Date, Time, DateTime, Currency, Float, Integer, Boolean, and Null String, and select the required binary encoding from the dropdown list.

Data formats

8. On the Exported rows page, specify the rows to export, then click Next.

  • Export all rows – Exports all rows in the table.

  • Export selected rows only – Exports only the rows selected in Data Editor.

  • Export a range of rows – Exports a specified range of rows. Enter the starting row and the number of rows to include in the export. To export all rows following the specified starting row, set Count to 0.

Exported rows

9. On the Errors handling page, choose how to process errors and how they should be logged.

9.1. Select one of the following error handling options:

  • Abort at the first error – Stops the export immediately when the first error occurs.

  • Prompt a user for an action – Stops the export when an error occurs and prompts the user to choose an action.

  • Ignore all errors – Continues the data export, skipping any errors without interruption.

9.2. Optional: To create a log file, select Write a report to a log file, then click the ellipsis (…) and select the folder where you want to save the file.

Errors Handling

Note

To save your export settings as templates for recurring scenarios, expand the Save menu and select Save Template. You can then use the templates to export data from the command line.

Save Template

10. Click Export.

11. On the Finish page, select one of the following actions:

  • Show log file – Opens the log file.

  • Open result file – Opens the exported file.

  • Open result folder – Opens the folder containing the exported file.

  • Export more – Starts another export.

Export Completed

12. Click Finish.