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. – FutbolFan Aug 13 '15 at 21:04
-
I tried pasting from excel and it gave me one line of numbers – Eduard Anghelescu Aug 13 '15 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. – halfer Aug 13 '15 at 21:06
-
2Why isn't there an easy way to do it? I would assume its such a common thing! – Eduard Anghelescu Aug 13 '15 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). – halfer Aug 13 '15 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. – halfer Aug 13 '15 at 21:10
-
@EduardAnghelescu Replace the edited question with your sample data. – FutbolFan Aug 13 '15 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! – FutbolFan Aug 13 '15 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). – halfer Aug 13 '15 at 21:13
-
@EduardAnghelescu See stackoverflow.com/tour and meta.stackexchange.com/questions/92107/…. SO isn't meant to be a forum :) – Brian Aug 13 '15 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 James Aug 13 '15 at 21:47
-
use this tool, tablesgenerator.com – Wajid Apr 9 '19 at 13:08
Add a comment
|
Here's an ASCII table, which I render in a monospace font using the code tool:
|---------------------|------------------|
| Heading 1 | Heading 2 |
|---------------------|------------------|
| 12 | 34 |
|---------------------|------------------|
Update
Although ASCII-art tables are perfectly fine, table Markdown is now supported by the platform.
| 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 |
---|---|
| | * |
-
2
-
1
-
101
-
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. – halfer Aug 13 '15 at 21:15
-
3
-
-
4This is a good website I used to generate ASCII code table easily asciiflow.com – Ng Sek Long Nov 25 '19 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) – dss Aug 19 '20 at 4:57
-
-
-
-
Any idea why this only works when editing this question? stackoverflow.com/questions/67091851/… – mplungjan Apr 14 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. – halfer Apr 14 at 14:52
-
1