This Week's Sponsor:

Incogni

Put an End to Spam, Scams, and Robocalls on Your iPhone


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.

Access Extra Content and Perks

Founded in 2015, Club MacStories has delivered exclusive content every week for nearly a decade.

What started with weekly and monthly email newsletters has blossomed into a family of memberships designed every MacStories fan.

Learn more here and from our Club FAQs.

Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with apps, tips, automation workflows, longform writing, early access to the MacStories Unwind podcast, periodic giveaways, and more;

Club MacStories+: Everything that Club MacStories offers, plus an active Discord community, advanced search and custom RSS features for exploring the Club’s entire back catalog, bonus columns, and dozens of app discounts;

Club Premier: All of the above and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.