# Pasting tables into the composer behaves oddly at times

**URL:** <https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785>\
**Category:** Feature\
**Created:** [2017年十月25日 18:59 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785 "2017-10-25T18:59:49Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2017年十二月1日 20:14 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/32 "2017-12-01T20:14:22Z")

</div>

[https://github.com/discourse/discourse/pull/5389](https://github.com/discourse/discourse/pull/5389)

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2017年十二月2日 01:12 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/35 "2017-12-02T01:12:31Z")

</div>

OK it is merged, let’s try pasting from Excel, latest version, Windows 10:

test 1  
data 0.5  
sample 3

Nice worked perfectly 👍 no extra image nonsense. Next step: make it a cool Markdown table! 😉

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2017年十二月3日 02:31 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/36 "2017-12-03T02:31:51Z")

</div>

> [@codinghorror](#):
>
> I can’t think of any reason, ever, that you would want a picture of a table of numbers rather than … an actual table of numbers

I actually used the paste-as-image all the time when explaining something or showing a complicated calculation. It does make sense.

e.g.:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/1/e1fbb3402ccc5b1db4983c4ddb0a474dbdb38048.png)

But if you really want that you can go the intermediate route of GIMP etc. to get a bitmap.

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2017年十二月3日 05:08 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/37 "2017-12-03T05:08:03Z")

</div>

Do you think even pasting it as markdown table can’t fulfill your needs?

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2017年十二月4日 16:11 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/38 "2017-12-04T16:11:30Z")

</div>

PR created for [Paste as Markdown Table](https://github.com/discourse/discourse/pull/5393) and merged.

Edit: testing with excel table in Windows 10

| test | 1 |
| --- | --- |
| data | 0.5 |
| sample | 3 |

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2017年十二月4日 20:21 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/39 "2017-12-04T20:21:30Z")

</div>

This is awesome, so magical 🎇

| Thing | Another | Total |
| --- | --- | --- |
| 1 | 1 | 2 |
| 1 | 2 | 3 |
| | | 5 |

Can anyone test if pasting in from Numbers on Mac and Open Office / Libre Office works as well?

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2017年十二月4日 21:11 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/40 "2017-12-04T21:11:10Z")

</div>

> [@sam](#):
>
> Libre Office works as well?

| AAAA | ZZZZ |
| --- | --- |
| A | 1 |
| B | 2 |
| C | 3 |
| AVG | 2 |

LibreOffice on Linux is 👌

This is crazy useful in some types of forums. AWESOME!

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2017年十二月4日 21:22 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/41 "2017-12-04T21:22:35Z")

</div>

**Apple Numbers:**

Table title   
Row 1 Data 1  
Row 2 Data 2  
Row 3 Data 3

**Google Docs:**

Table title   
Row 1 Data 1  
Row 2 Data 2  
Row 3 Data 3

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2017年十二月4日 21:23 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/42 "2017-12-04T21:23:40Z")

</div>

@vinothkannans looks like both of the above may need some refinements (Numbers and Google docs), do you have a Mac to test?

---

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [2017年十二月5日 03:27 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/43 "2017-12-05T03:27:34Z")

</div>

| Header 1 | Header 2 |
| --- | --- |
| Bold | ⓭ |
| Italics | Yellow BG |
| Underlined | RED |

OK, looks like formatting is not included. A pity… But what a _GREAT_ and _WONDERFUL_ feature this is!!!

---

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [2017年十二月5日 03:29 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/44 "2017-12-05T03:29:10Z")

</div>

### Just Table in Microsoft Word:

| Header 1 | Header 2 |
| --- | --- |
| Row 1 | Row 1.1 |
| Row 2 | Row 2.2 |

Yay!

### Whole doc from Word with heading and table:

My Heading

The following is an awesome table outlining what I just described:  
Header 1 Header 2  
Row 1 Row 1.1  
Row 2 Row 2.2

Another paragraph of text after the table.

Nope.

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2017年十二月5日 05:26 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/45 "2017-12-05T05:26:12Z")

</div>

I don’t have Mac to test. I guess if I fix Google Docs it will be fixed there too.

Edit: Now it is working for Google Spreadsheet tables too. Can anyone re-test it on Apple Numbers?

| test | 1 |
| --- | --- |
| data | 0.5 |
| sample | 3 |

---

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [2017年十二月5日 06:06 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/46 "2017-12-05T06:06:19Z")

</div>

A table inside Google Docs will not work though, as it doesn’t copy as tab-delimited rows, but one cell on its own row after another.

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2017年十二月5日 06:13 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/47 "2017-12-05T06:13:57Z")

</div>

Yes. My commit is yet supporting pasting in Google Docs or Tables inside Document files. As I said, it is only for Excel, Spreadsheet and Numbers.

For Docs please follow other topic [HTML/RTF pasting - #17](https://meta.discourse.org/t/html-rtf-pasting/55913/17)

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2017年十二月5日 20:06 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/48 "2017-12-05T20:06:40Z")

</div>

| RAID Array Space Calculator | Type 1 | Type 2 |
| --- | --- | --- |
| Number of Arrays of this type: | 9 | 3 |
| Number of Disks in this type Array: | 10 | 4 |
| Number of Spares in this type Array: | 0 | 0 |
| Disk Capacity: (GB) | 10000 | 2000 |
| RAID Level: | raidz3 | 10-2x |
| | | |
| _Usable Capacity / Array_: | 70000 | 4000 |
| _Usable Capacity (Array Total)_: | 630000 | 12000 |

My canonical example looks pretty damn good, and took 5 seconds to refine into exactly how I wanted it to look (merging top two lines, adding italics). Well done @vinothkannans 👏

---

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [2017年十二月5日 23:32 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/49 "2017-12-05T23:32:35Z")

</div>

I tried numbers before merging it was working

number sample:

| Money In | |
| --- | --- |
| Paycheck | €4 000 |
| Additional income | €0 |
| Total income | €4 000 |

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2018年二月22日 07:41 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/50 "2018-02-22T07:41:39Z")

</div>



---

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [2021年十二月15日 21:48 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/51 "2021-12-15T21:48:40Z")

</div>

当剪贴板同时包含图像和文本时粘贴似乎又引起了问题。我将在此处粘贴来自 LibreOffice 的表格进行测试（我们曾收到过类似 Excel 的报告）：

[synthfive@synth.com](mailto:synthfive@synth.com)  
teurorack  
 ![image](https://global.discourse-cdn.com/meta/original/3X/2/f/2fb487135c369cbd4fe6b374621cbe72b986eb48.png)

当我将表格粘贴到编辑器时，会创建一个 markdown 图像标签：

```plaintext
synthfive@synth.com
teurorack
![image|205x17](upload://6O1dCT74X45mQmlBp54nm0GnrZK.png)

```

---

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [2021年十二月15日 21:51 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/53 "2021-12-15T21:51:40Z")

</div>



---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2022年一月13日 19:15 UTC](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785/54 "2022-01-13T19:15:26Z")

</div>

这是我在 Microsoft Word 中的测试用例

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/d/bdec1cc9497099c96db4a3c38ba16601f838c9f6.jpeg)

粘贴后我得到

> 还有一些文本

让我颠倒顺序（先文本）看看……结果一样。我按 Ctrl+A 来选择整个文档，它是一个图像和一行文本。

[上一頁](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785.md?page=1)

[下一頁](https://meta.discourse.org/t/pasting-tables-into-the-composer-behaves-oddly-at-times/72785.md?page=3)
