How to get stiltsoft's Table from CSV macro to recognise commas, not hyphens to as the separator?

Greg
Contributor
November 11, 2020

I have attached a CSV file to a Confluence page and then used the Table from CSV macro (as described here) to display the file's contents as a table on the page.  The file has 20 lines.  The table on the page has 20 rows.  So far, so good.  Each line in the CSV file has two values separated by a comma.  Each row in the table on the page has not two columns, but three.  The line in the CSV file that says 2020-11-11, 3.145  is rendered in the table as:

| 2020 | 11 | 11, 3.145 |

It looks like the macro has decided that each line in the CSV file is not one of comma-separated values, but rather of hyphen-separated values.

How can I convince the macro otherwise?

1 answer

1 accepted

3 votes
Answer accepted
Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2020

Hi @Greg ,

It seems that your file is missing headers:

222222.png

11111.pngTry to add them and preview the result. Besides you'll need headers to create your chart.

Greg
Contributor
November 12, 2020

Yes, that was it.  Thanks.

If, @Katerina Kovriga _Stiltsoft_ , you have any influence on the contents of the documentation page at https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+from+CSV+macro, may I suggest that it include mention of the requirement that a CSV file's top-most line must be a line of headers?

Also, for future readers of this thread, I'll mention here that I had to remove the space after each comma.  So, in the header line, I had to change Date, Value to Date,Value.  In the data lines, I had to change, for example, 2020-11-11, 3.145 to 2020-11-11,3.145.

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2020

Thanks for the feedback, I'll pass it to the support team.

We've just never had such issues before: our clients often generate and upload CSV files from SQL databases and big Excel/Google spreadsheets tables, so there are no extra spaces between cell values and there are always column headers (their goal is to filter such tables/create pivots right in Confluence).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events