10

When I copy the specific Excel cells and paste them on a Stack Exchange site, it's automatically pasting 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
6

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

1
  • 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?) – Cave Johnson Jan 4 at 20:53

You must log in to answer this question.

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