2024-07-23
|.Use a text editor (e.g., Notepad, VSCode) to open your CSV file. The data should be separated by commas.
Manually replace each comma , with a pipe |. This is the character Markdown uses to separate columns.
Example CSV:
Name,Age,Location
John,30,USA
Jane,25,Canada
Converted:
| Name | Age | Location |
|------|-----|----------|
| John | 30 | USA |
| Jane | 25 | Canada |
Once you have replaced the commas, make sure to include a header row with a separator row beneath it using dashes -. Each pipe in the header and separator is mandatory to maintain the table structure.
Your final Markdown table should look like this:
| Name | Age | Location |
|------|-----|----------|
| John | 30 | USA |
| Jane | 25 | Canada |
With this format, you can now display your data as a table in Markdown.