-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV export uses commas as thousands separator #963
Comments
pls upload a test export |
On some further thought, it looks like any numerical values are fed through toLocaleString here, and then not checked for the presence of |
i use "toLocalString" because CSV in some countries have ; to split columns. for example in german we use . for thousand separator instead of , and , for decimal point. thats why CSV files are different in some countries. |
Hmm, perhaps an addiitonal thousands separator check like here with a switch to semicolon if |
@meteyou This issue seems to have cropped up again when exporting print history. There is an unescaped comma in the You can see an example of this below: And when viewing the exported csv in VScode: The comma is not escaped in the |
@drewmo it's not the same issue. Only similar... Which location / language do you use on your pc? Mainsail use the local time format from your pc, so I need this setting to reproduce the issue. |
@meteyou I am on a Mac, using the following date/time settings: Also using Firefox as my browser with English(US) as the language. |
Mainsail Version:
2.2.0
Browser:
Firefox
Device:
Laptop
Operating System:
Linux
What happened?
The CSV export option in printer history seems to use
,
as a thousands separator, which causes the numerical value to be broken into two columns, and the export invalid.For example, a print that expended 22843 millimeters of filament will be exported as
22,843
.Doing some RTFS, it seems that the exporter is supposed to switch to using semicolons as column separator in such case; however, this also does not occur, and any attempt to import the produced CSV is doomed to parse
22,843
as two separate columns.What did you expect to happen instead?
CSV export should do one of these:
How to reproduce this bug?
Export history as CSV where any print exceeds 1000 mm of printed filament.
Additional information:
I suspect that this is probably due to browser locale settings or some such nonsense.
The text was updated successfully, but these errors were encountered: