Converting Google Sheets Table to Markdown Table Format

We can easily convert Google Sheets spreadsheets into a Markdown table using Google Apps Script. Additionally, we can filter out personally identifiable informa

Ceyhun Enki Aksan
Ceyhun Enki Aksan Entrepreneur, Maker

What is Google Apps Script? What is it used for? [https://ceaksan.com/tr/google-apps-script] Following this article, let’s continue with example operations1. In this article, we will discuss converting spreadsheet content into a Markdown table format.

In the example operation, we will convert the spreadsheet content into a suitable format for appending to a Markdown file. Additionally, certain fields can be censored depending on the specified column names during the conversion process.

We can illustrate our table for the operation as follows.

Google Spreadsheet
Google Spreadsheet

At this stage, we can retrieve the relevant row and column values by looping through them, and transfer the values according to the column names.

After implementing the code, the output will look as follows.

NameEmail_piiDescriptionAddress_piiCountry
John Doe***Product Manager***United States
Jane Smith***Software Engineer***Canada
David Johnson***Marketing Specialist***United Kingdom
Sarah Williams***Graphic Designer***Australia
Michael Brown***Sales Representative***Germany
Jennifer Davis***Financial Analyst***France
Christopher Miller***Human Resources Manager***Spain
Amanda Wilson***Project Coordinator***Italy
Matthew Taylor***Data Analyst***Japan
Emily Anderson***UX Designer***Brazil
Daniel Martinez***Operations Manager***Mexico
Olivia Thomas***Content Writer***India
Andrew Lee***Business Development Executive***South Korea
Sophia Hernandez***Quality Assurance Tester***China
James Clark***IT Support Specialist***Russia
Natalie Baker***Customer Service Representative***Sweden
William Green***Accountant***Norway
Grace Adams***Event Planner***Denmark
Benjamin Walker***Research Scientist***Netherlands
Victoria Wright***Social Media Manager***Belgium

The output of the code can be accessed through logs or dialogs and can be exported to markdown files.

Footnotes

  1. Google Sheets - Forms and JSON Operations