I have a question on SQL which is really hard to ask without tables. I tried copying and pasting from Excel but it didn't work. How do I paste table in Stack Overflow so I can ask an actual question?
-
Just add sample data with table columns like you would display in a spreadsheet.– FutbolFanAug 13, 2015 at 21:04
-
I tried pasting from excel and it gave me one line of numbers– Eduard AnghelescuAug 13, 2015 at 21:06
-
3I tend to use ASCII tables - use the code format button, and then use spaces to line columns up. For a spreadsheet, maybe export as CSV, use spaces instead of commas, and then tidy in the Stack Overflow editor.– halferAug 13, 2015 at 21:06
-
2Why isn't there an easy way to do it? I would assume its such a common thing!– Eduard AnghelescuAug 13, 2015 at 21:09
-
(Bear in mind that questions about Stack Overflow are not on-topic on the main board. This should really be asked on Meta Stack Overflow).– halferAug 13, 2015 at 21:09
-
@FutbolFan: please add an answer! The question is not an appropriate place for an answer, since it reads like the OP knew the answer all along.– halferAug 13, 2015 at 21:10
-
@EduardAnghelescu Replace the edited question with your sample data.– FutbolFanAug 13, 2015 at 21:10
-
@halfer I believe he is looking to ask a SQL question, but he seems pretty new to SO, so he is having some difficulty adding a table in his post. I just added a sample format, hopefully that should help!– FutbolFanAug 13, 2015 at 21:12
-
1@FutbolFan: it was helpful, but still, answers in the answer box please. This question is about to close (we also don't recycle questions here).– halferAug 13, 2015 at 21:13
-
@EduardAnghelescu See stackoverflow.com/tour and meta.stackexchange.com/questions/92107/…. SO isn't meant to be a forum :)– BrianAug 13, 2015 at 21:18
-
OK, tables of text data. Next week it'll be 'can I include my metadata/schema', and then 'I attach my entire database' :(– Martin JamesAug 13, 2015 at 21:47
-
1use this tool, tablesgenerator.com– WajidApr 9, 2019 at 13:08
Add a comment
|
1 Answer
As of November 2020, table Markdown is now supported on all Stack Exchange sites.
| Heading 1 | Heading 2 |
|---------------------|------------------|
| 12 | 34 |
| 99 | 42 |
renders as
Heading 1 | Heading 2 |
---|---|
12 | 34 |
99 | 42 |
You can escape the bar character within a cell using a backslash, like \|
, like so:
bar | asterisk |
---|---|
| | * |
Pre-November 2020
Here's an ASCII table, which I render in a monospace font using the code tool:
|---------------------|------------------|
| Heading 1 | Heading 2 |
|---------------------|------------------|
| 12 | 34 |
|---------------------|------------------|
-
2
-
1
-
111
-
1@Eduard, you can always raise a feature request on Meta if you wish. I've been here for some years, and I've never seen anyone request it.– halferAug 13, 2015 at 21:15
-
3
-
4This is a good website I used to generate ASCII code table easily asciiflow.com Nov 25, 2019 at 9:26
-
@NgSekLong that's so cool. But how can you add text and copy it? (I could draw squares but that's it)– dssAug 19, 2020 at 4:57
-
-
-
-
Any idea why this only works when editing this question? stackoverflow.com/questions/67091851/… Apr 14, 2021 at 12:40
-
@mplungjan: it looks like the title of "FileA - SheetX" was on the same line as the header row of the table, so it was not rendered as a table. Looks like the table rows need to be on their own line.– halferApr 14, 2021 at 14:52
-
1
-
-
2