THIS WEEK'S SPONSOR:

Kolide

Endpoint Security for Teams That Want to Meet Compliance Goals without Sacrificing Privacy


Workflow: Convert Spreadsheets to MultiMarkdown Tables

Going from a spreadsheet to a MultiMarkdown table with a workflow on iOS.

Going from a spreadsheet to a MultiMarkdown table with a workflow on iOS.

This is a proof of concept that I put together out of curiosity today, and it’ll likely break for some documents or Microsoft Excel, but it’s been working well for me, and I thought I’d share it.

I created a workflow that converts colums/rows copied from spreadsheets in Numbers and Google Sheets to a MultiMarkdown table.

I never understood how to write MultiMarkdown tables manually, and I prefer the experience of apps like Numbers and Sheets, which allow me to easily navigate between cells, modify text that’s already been entered, and copy selections with the tap of a button. However, all my writing is done in Markdown, and I didn’t have an easy way to convert the output of Numbers and Sheets into text that could be understood by Editorial and processed to HTML for MacStories. So, I wrote a workflow that converts text copied from a spreadsheet to a Markdown table that Editorial (and other apps like Byword) can preview and convert to HTML.

To use the workflow, you need to:

  1. Select columns/rows in a spreadsheet and copy them;
  2. Run the workflow, which will save output to the system clipboard;
  3. Paste the result in apps that can preview Markdown tables (like Editorial) and preview the table.

The workflow is based on a number of assumptions you need to keep in mind:

  • It splits text at tab characters (what Numbers and Google Sheets use to separate cells when copying them as text ) so cells that already contain a tab won’t likely work with it;
  • It generates placeholder “Headers” in the Markdown table – you have to edit these yourself in your text editor of choice;
  • Because the syntax for MultiMarkdown tables is heavily based on the pipe character ( | ), spreadsheets that contain it may have issues with the workflow.

The workflow has been working beautifully for the “basic” spreadsheets I have: I can now copy text, run the workflow, and end up with a fully assembled MultiMarkdown table that I can paste in Editorial. All I need to do is change the “Header” placeholder with what I want – I could have used the first row of a spreadsheet for the headers’ names, but I figured it’d be better to change the final output manually.

With this workflow, I can go from this:

To this, in two seconds:

I’m excited about the possibility of turning Google Sheets documents (which I’m using with Zapier quite a bit) into tables I can put on MacStories without leaving my iPad or writing a complex Python script for the task.

You can download the workflow here. If you have improvements/suggestions, I’d love to hear from you.

Unlock More with Club MacStories

Founded in 2015, Club MacStories has delivered exclusive content every week for over six years.

In that time, members have enjoyed nearly 400 weekly and monthly newsletters packed with more of your favorite MacStories writing as well as Club-only podcasts, eBooks, discounts on apps, icons, and services. Join today, and you’ll get everything new that we publish every week, plus access to our entire archive of back issues and downloadable perks.

The Club expanded in 2021 with Club MacStories+ and Club Premier. Club MacStories+ members enjoy even more exclusive stories, a vibrant Discord community, a rotating roster of app discounts, and more. And, with Club Premier, you get everything we offer at every Club level plus an extended, ad-free version of our podcast AppStories that is delivered early each week in high-bitrate audio.

Choose the Club plan that’s right for you:

  • Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with app collections, tips, automation workflows, longform writing, a Club-only podcast, periodic giveaways, and more;
  • Club MacStories+: Everything that Club MacStories offers, plus exclusive content like Federico’s Automation Academy and John’s Macintosh Desktop Experience, a powerful web app for searching and exploring over 6 years of content and creating custom RSS feeds of Club content, an active Discord community, and a rotating collection of discounts, and more;
  • Club Premier: Everything in from our other plans and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.