Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2026-06-08 23:40:44 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
17f74cf621ced95f044b4ee467441928b5b80e50
notifications-admin/tests/spreadsheet_files/newline_windows.csv

1 line
153 B
CSV
Raw Normal View History

Accept common spreadsheet formats, not just CSV We require users to export their spreadsheets as CSV files before uploading them. But this seems like the sort of thing a computer should be able to do. So this commit adds a wrapper class which: - takes a the uploaded file - returns it in a normalised format, or reads it using pyexcel[1] - gives the data back in CSV format This allows us to accept `.csv`, `.xlsx`, `.xls` (97 and 95), `.ods`, `.xlsm` and `.tsv` files. We can upload the resultant CSV just like normal, and process it for errors as before. Testing --- To test this I’ve added a selection of common spreadsheet files as test data. They all contain the same data, so the tests look to see that the resultant CSV output is the same for each. UI changes --- This commit doesn’t change the UI, apart from to give a different error message if a user uploads a file type that we still don’t understand. I intend to do this as a separate pull request, in order to fulfil https://www.pivotaltracker.com/story/show/119371637
2016-05-05 15:41:11 +01:00
phone number,name,favourite colour,fruit 07739 468 050,Pete,Coral,tomato 07527 125 974,Not Pete,Magenta,Avacado 07512 058 823,Still Not Pete,Crimson,Pear
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 422ms Template: 9ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API