4 ms·
Just use TSV. Commas are a terrible delimiter because many human strings have commas in them. This means that CSV needs quoting of fields and nobody can agree o
by zarzavat 2y ago
Just use TSV. Commas are a terrible delimiter because many human strings have commas in them. This means that CSV needs quoting of fields and nobody can agree on how exactly that should work.
TSV doesn’t have this problem. It can represent any string that doesn’t have either a tab or a newline, which is many more than CSV can.
- didntcheck 2y agoThe one flaw I do see with them is blank cells If you go with the CSV convention of two adjacent tabs => blank cell in the middle, then rows of different length will not line up properly in most text editors. And "different length" depends on the client's tab width too If you allow any amount of tabs between columns, then you need a special way to signify an actually-blank column. And escaping for when you want to quote that If you say "use tabs for columns and spaces for alignment", then you've got to trim all values, which may not be desirable
- orev 2y agoYou’re talking about issues with alignment when data is displayed on a terminal or text editor, which is not at all related to data exchange. In data exchange nobody ever allows multiple tabs between columns. If there are multiple tabs with nothing in between it means the column is empty for that row. Just like with CSV, TSV, is always a pain to edit manually so the issues there are the same. Using tabs does have a lower likelihood of conflicting with the actual data.
- didntcheck 2y agoThis is true, but I'd assumed that one of the major reasons to use TSV is for human readability. If not, then I'd personally choose an even rarer character as my delimiter
- btreecat 2y agoIn that case, why not use "|" (pipe character)?
- uncharted9 2y agoIt's 2024 and Excel still doesn't natively parse CSV with tabs as delimiters. When I send such csv files to my colleagues, they complain about not being able to open them directly in Excel. I wish Excel could pop up a window like LibreOffice does to confirm the delimiter before opening a csv file.
- kamaal 2y agoExcel is the best tool out there but it has its quirks. For example the web version doesn't have a dark mode. Google sheets and docs these days is more useful and feature rich than Excel.
- UnserMannInK 2y agoGoogle Sheets indeed does everything a common user would expect from a spreadsheet, without having to install anything and fiddle with licenses. This in itself is the killer feature. For me personally the absolute killer feature is the bidirectional integration with BigQuery, something you won’t get that easily (if at all, correct me if I am wrong) with Excel.
- pjmlp 2y agoAs long time Office user since Windows 3.1 days, Google sheets has a lot of terrain to cover up. Quattro Pro could easily do all of the sheets stuff but document collaboration, ignoring the fact that sheets is a Web application and Quattro Pro started on MS-DOS.
- thrdbndndn 2y agoFeature-wise, Excel probably still has more options, but in terms of ergonomics, Google Sheets is much better. And I'm saying this as someone who has used Excel for 20 years. Here are a few specific examples: 1. Editing formulas using the keyboard only is a nightmare in Excel. It often randomly throws errors and warnings when I move the cursor around (like typing parentheses or quotes first and then trying to move back to type text inside, etc.) before finishing editing. 2. Conditional formatting in Excel is so non-intuitive that I actively try to avoid it like the plague. Yet, I use it extensively in Google Sheets because it is so easy to create multiple rules there. 3. The whole copy/paste design choice in Excel is, in my opinion, weird. Firstly, there is a distinction between copying a cell and copying text: if you copy an entire cell, you cannot paste it as text in a formula or any other input area. You have to copy from the formula bar of that cell. Even for pure cell copying, the cells have to remain highlighted. If you copy a cell and then unselect it (by pressing Esc or trying to edit any cells), the copied content is lost. I'm sure there are reasons it's designed this way, but it's so irritating, and I never find any benefit.
- MattPalmer1086 2y agoThat's what I always use when I need to write out some tabular data. Haven't had any problem importing them into anything.