How to get ready-made text tables from excel for use as plain text or Markdown

I had the following situation:

A spreadsheet used to calculate prices for a bunch of different types of trees. (I'm a farmer)

This data has two uses:

  • I use it in Markdown to create tables on my web page.
  • I use it in kijiji ads.

The latter made things sticky. Cut and paste Excel data, separated by separate tabs. Nothing lining up. An excel plugin table in some program like Kijiji looks like this:

|   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   |

Ugh.

+4
source share
2 answers

If I have a table like this:

enter image description here

I would do it with the following steps:

  • , -, , , :

    enter image description here

  • , , , . , , Enter, Ctrl + Enter, :

    enter image description here

  • Courier New, :

    enter image description here

  • :

    enter image description here

, :

enter image description here

+5

excel.

  • .
  • .
  • .

, , :

"|"&A1&"|"&B1&"|"&C1...

, .

. . 5

"|"&A1&"||||"

, , :: --------: |...

. kijiji ( , ). , .

ascii. excell , . , , .

, ascii, MMD, .

:

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

. 2,50 , 2.5

.

1 , .

, . , , , A-E. F-J .

F1

=TEXT(A1,"$0.00")

. , , .

-, . , .

K2 : "|" F1 REPT ("", K $1-LEN (F1)) & "|" G1...

, , , REPT Cell. .

|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|

, .

0

Source: https://habr.com/ru/post/1524949/


All Articles