Excel to Markdown

Sherwood Botsford sgbotsford at gmail.com
Sun Feb 2 11:33:17 EST 2014

While MMD is wonderful, much of the time you want to do other things with
the data first.

My problem: I have a whole bunch of small tables I keep on an excel
spreadsheet for setting my prices for various numbers of trees and whatnot.

Here's a couple recipes for using excel data.

Layout your spreadsheet as normal.
Insert a blank row for the formating row.
Create a wide column to the right of your table

Each row corresponding to a table row has a formula something like this:


You will need to modify for possible grouping. E.g. A one line title on a
5 column table will end up being

In the blank cell corresponding to the formatting row, type an appropriate
string of |:--------:|...

My problem was a bit messier than that. I advertise on Canada kijiji (not
the same as the US version) They allow some formatting in ads but do not
have a table format at all.

I needed as ascii table. The results of cut and paste from excell into a
text processor are less than stellar, as data is separated with a single
tab character. Anything that lines up is coincidence.

My route was to take this notion one step further, and make an ascii
formated column that would work for either MMD or for text base ads.

First attempt:

"|" & A1 & REPT(" ",15-LEN(A1)) &
"|" & B1 &...

I didn't like the hard coding of the column widths.
And if your source column is $2.50 it comes across as 2.5

Second attempt.

1 blank column for column I want to use.

If our table is 5 columns wide, I need another 5 columns.

F1 in this one has the formula =TEXT(A1,"$0.00")
Replicate across and down as needed.

Secondly, insert a row above. In this row, but the column width you want
for the output.

Now your formula for K2 will look like this:
"|" & F1 & REPT(" ",K$1-LEN(F1)) &
"|" & G1 ...

At this point if I want flush right text, I have to reverse
the REPT and the Cell reference. No thoughts of centering.

Sample output results

|Bareroot Bundles of 25 2-3 year olds ||||

|Bundles |# Trees | Cost| Price Per Tree|


|5 Trees |5 | $30.00| $6.00|

|Single Bundle |25 | $75.00| $3.00|

|5 Bundles |125 | $300.00| $2.40|

|10 Bundles |250 | $525.00| $2.10|


Sherwood of Sherwood's Forests

Sherwood Botsford
Sherwood's Forests -- http://Sherwoods-Forests.com
50042 Range Rd 31
Warburg, Alberta T0C 2T0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20140202/48f6a0ea/attachment.htm>

More information about the Markdown-Discuss mailing list