15

When I copy the specific Excel cells and paste them into a Stack Exchange post, the data is automatically treated as an image. It would be great if it is pasted as the new table format.

OS : Windows 10 Excel: Office 365 Version 1908

For example, after pressing Ctrl+V or +V, the following image is added:

Excel Cells

Instead, the following native HTML table should be generated:

S/No Item Qty
1 Product 1 10
2 Product 2 15
3 Product 3 30
4
  • Also consider upvoting meta.stackexchange.com/a/357632/394472 Commented Dec 29, 2020 at 14:56
  • 3
    This question should be reopened. The linked "bug" report has nothing to do with the latest table support, whereas this question is a feature request same as meta.stackexchange.com/a/357632/394472 but as a separate question. Commented Dec 29, 2020 at 15:21
  • @BoghyonHoffmann not duplicate, but looks like OP means only SO, which makes it off topic here. Commented Jan 4, 2021 at 8:57
  • 4
    @ShadowWizardisVaccinating The question author seems to agree with the edit 8, suggesting he actually meant to enable this feature on all Stack sites where the table feature is available. There is no reason to restrict this feature to Stack Overflow. Commented Jan 4, 2021 at 19:54

1 Answer 1

9

While we wait for this feature to be implemented, here is a trick you can use from within Excel to convert the data into Markdown format:

In an empty cell to the right of the first row of the data, use this formula:

=CONCATENATE("|",TEXTJOIN("|",FALSE,A1:C1),"|")

Where A1 and C1 should be updated to reflect the starting column (and row) and ending column.

This will give you the markdown for a single row. Double click the little box at the bottom right corner of this cell to expand the formula to the end of the data. That should give you all of the data in Markdown format. You will just have to manually insert the row which separates the table heading from the body (i.e. |---|---|---|)

2
  • I'm not really experienced with excel so there might be an even better way of doing this without having to expand the formula (some kind of script perhaps?) Commented Jan 4, 2021 at 20:53
  • For Google sheets:Click here.
    – TheMaster
    Commented Nov 1, 2022 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .