Google Drive – Google Sheets – Pasting Tables

 

Background

We all take for granted how seamlessly Microsoft Products work together.

Take for instance, I use Microsoft SQL Server Management Studio to run a query and I will like to prepare a document from the query’s result.

I simply copy the Output Grid’s content, launch Microsoft Word or Excel, and pasted it.

Through the magic of OLE or whatever they call it these days, the data is well received and formatted in the receiving Office App.

 

Google Drive

These days my main sharing tool is WordPress for public consumption and Google Docs for private data.

 

Here is the genesis of our Problem

SQL Server Management Studio ( SSMS )

Grid

Here is output of a query I ran in SSSM

ssms

Explanation

  1. Nice and visually appealing for an Engineer

 

Google Drive – Google Docs

Here is what things look like when pasted into Google Docs..

copiedintogoogledocs-20170120-1031am

 

What to do

  1. Looked for Convert to Table
  2. Insert Text as table
  3. Import Text

 

Nothing helpful.

 

Solution – 01

Google Drive – Google Sheets

Created a new file, rather than Document went with Sheets

copiedintogooglesheets-2017012-1039am

 

Explanation

  1. Making progress
    • Kept the grid or columns paradigm
    • That is things are not jumbled well, with text intertwined together

 

Google Drive – Copy From Google Sheets Into Google Docs

Here we copied the cells from Google Sheets Into our original Google Docs

copiedfromgooglesheetintodocs-20170120-1044am

 

Explanation

  1. Thankfully things are kept neatly arranged in a Columns
  2. Need to get rid of some extra columns and that is doable

 

Google Drive – Google Docs – Table – Delete Extra Columns

Got rid of the extra columns using the menu item Table / Delete Columns.

Steps

  1. Inside the Google Doc
  2. Select the extra columns
  3. And, use menu item Table / Delete Columns

 

googledocs-columnsdeleted-20170120-1053am

Format the Table

One of the great things about these Google Products such as Chrome and Google Drive is that they are extensible and have such a nice and rich 3rd party ecosystem.

 

Adds On

Table Formatter

I already have Table Formatted installed and so let us initiate it by accessing Google Docs menu items “Add-ons” \ “Table Formatter”.

 

Google Docs – Menu – Add-Ons

addson

 

Add-On – Table Formatter – Default Templates

Here are some of the Default Templates available

tableformatter-20170120-1057am

Customize Table with Add-On – Table Formatter

Select the Google Docs’s tale and choose the one of the Formatting Choices.

Here is our colored layout.

googledocs-tableformatted-20170120-1103am

 

Summary

  1. Copy SSMS Grid Data into Clipboard
  2. Create a new Google Sheet ou use existing one
    • Paste copied into Sheet
  3. Create a new Google Doc
    • Select data from Google Sheet
    • Copy into Clipboard
    • And, paste into Google Doc
  4. In Google Docs
    • Using 3rd Party Add Ons such as Table Formatter format Table

Solution – 02

Outline

  1. Copy SSMS Grid output into Clipboard
  2. Use Microsoft Excel
    • Launch Microsoft Excel
    • Copy Grid’s data into Excel
    • If you like the way Excel Formats Table, use Excel’s Table Formatting functionality
      • Using F8, make Sheet’s column into actual table
        • Be sure you have Column Headers and all
  3. Create or use New Google Docs
    • Copy Table’s content from MS Excel
    • Paste into Google Doc

 

In MS SSMS, Copying with Headers

ssms-copywithheaders-20170120-1126am

Explanation

 

In MS Excel, Pasted SSMS Grid

excel-pastedgrid-20170120-115am

 

In MS Excel, Create Table

Here is the panel displayed upon clicking on F8 and thus initiating the “Create Table” options

createtable-20170120-1119am

Explanation

  1. Please pay attention to the “My table has headers” option

 

In MS Excel, Formatted Table

excel-createtabled-20170120-1120am