{"id":13596818,"url":"https://github.com/janisdd/vscode-edit-csv","last_synced_at":"2026-04-03T00:11:19.281Z","repository":{"id":35194998,"uuid":"172789157","full_name":"janisdd/vscode-edit-csv","owner":"janisdd","description":"vs code extension to edit csv files with an excel like table ui","archived":false,"fork":false,"pushed_at":"2025-04-07T06:19:34.000Z","size":7213,"stargazers_count":239,"open_issues_count":18,"forks_count":38,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-07T07:26:25.270Z","etag":null,"topics":["csv","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janisdd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-26T20:55:16.000Z","updated_at":"2025-04-07T06:19:37.000Z","dependencies_parsed_at":"2024-04-16T04:46:10.584Z","dependency_job_id":"cd005e08-c216-4483-bb6f-cbb25499904d","html_url":"https://github.com/janisdd/vscode-edit-csv","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janisdd%2Fvscode-edit-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janisdd%2Fvscode-edit-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janisdd%2Fvscode-edit-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janisdd%2Fvscode-edit-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janisdd","download_url":"https://codeload.github.com/janisdd/vscode-edit-csv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248107348,"owners_count":21048908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","vscode-extension"],"created_at":"2024-08-01T16:02:49.580Z","updated_at":"2025-10-21T00:50:39.756Z","avatar_url":"https://github.com/janisdd.png","language":"TypeScript","readme":"# vscode-edit-csv\n\nThis extensions allows you to edit csv files with an excel like table ui\n\n## Web version\n\nIf you don't have vs code to hand, you can use the online version at https://edit-csv.net\n\n## Features\n\nExecute the command `edit as csv` to open an editor for the current file.\n\n*Execute the command again to switch back to the source file or to switch back to the editor*\n\n![feature X](images/titleImg.gif)\n\n**Note that the data flow is one way (editor to source file). If you make changes to the source file (.csv) while the editor is open, the editor will not be updated!**\n\n## ¡ Important Notes !\n\n- On initial load all rows are expanded so that all rows have equal length (number of cells (if necessary))\n\t- if that happens you will see the `unsaved changes` indicator right from the start\n\n- enabling/disabling the `has header` read option will **clear the undo/redo stack!**\n\n- empty lines are skipped!\n\t- this will not trigger the `unsaved changes` indicator\n\t- (during parsing) a row is also empty when it only contains `\"\"`\n\t\t- this can be problematic if you have only 1 column...\n\n- We try to retain quote information (default) but in *some cases* fields could get unquoted on save (see [Retain Quote Information Rules](##retain-quote-information-rules))\n\n- Comment row (rows starting with a comment) will only export the first cell\n\t- if you accidentally added comment text to a cell other than the first cell you will notice it (color)\n\n- Adding new lines to comments rows (via alt + enter) will have no effect when exporting (lines breaks are removed in comments!)\n\t- leading spaces will be removed in comment rows!\n\n- Starting with Version **0.1.0** the table has a context menu (right-click the table)\n\t- *(just mentioning it because it is not obvious via the ui)*\n\n- Plugin Version **0.0.11** had an issue with loading and saving files with more than \\~1 MB\n\t- saved files were corrupted (content of the first \\~1MB was repeated after the first \\~1MB until the file size was reached)\n\n## Retain Quote Information Rules\n\nduring parsing information about the quotes are stored\n\n- quote information is only stored for columns\n- only the first non-comment, not empty row (no fields) is used to gather quote information\n- if the first row has less cells than other rows\n\t- then missing entries are filled with `csv-edit.newColumnQuoteInformationIsQuoted` (default is not quoted)\n- manually added columns will get `csv-edit.newColumnQuoteInformationIsQuoted` quote information\n- moving columns will also \"move\" the quote information\n\t- e.g. column 3 was quoted and is now column 1 then column 1 is quoted after moving\n\n\nImplications of this\n\n- columns with mixed cells (quoted and not quoted fields) will get homogeneously quoted\n\n\nThis can be turned off by setting `csv-edit.retainQuoteInformation` to `false`\nIn this case all unnecessary quotes are removed\n\n\n## How this extension works\n\n*essentially it's just import csv and export csv*\n\nWhen you click on `Edit CSV file`\n\n- the file content is cut into pieced and transferred via `[webview].postMessage`\n- the current config is stringified and injected into the editor (webview) html\n- a manager stores a reference to the webview, source file uri, editor uri\n\n- in the webview the pieces are put together and the text is parsed as csv and displayed in the (handsontable) table element\n\nWhen you click on `apply`\n\n- the current table is transformed into csv, transferred via `vscode.postMessage` to the extension and written to the source file\n\t- if you clicked on `apply` by accident, you can undo the changes in the table element (with the usual shortcuts) and apply again or open the source file and just do an undo (with the usual shortcuts)\n\n- When you click on `apply and save`\n\t- the first step is equal to `apply`\n\t- then the source file is saved\n\n\n- When you click in `Read again`\n\t- the injected content is used (when the editor was opened), this does not read the source file again\n\nAs you can see this **does not** scale very well with **large csv files** (needs to be stringified and stored the whole time)\n\n## Extension Settings\n\nThere are some settings for this plugin. Open the VS Code Settings and search for `csv-edit`\n\n### Supported file types/extension\n\nFiles with the extension `.csv`, `.tsv` should work out of the box.\n\nYou can change the file type in the bottom right corner of the editor (select language mode). This is required for unnamed/new files.\n\nFor `tsv`, make sure the indentation is set to `tabs`.\n\n### File extension xyz is not recognized by the vs code extension\n\nSee https://code.visualstudio.com/docs/languages/overview#_adding-a-file-extension-to-a-language\n\nIf the link is down: Search for `files.associations` in the vs code settings. Then add an entry for `*.xyz` to `csv`.  \nNow the file is treated as a csv file and is recognized by the extension\n\n## Drag to Auto Fill\n\nStarting from version `0.10.0` the setting `dragToAutoFill` defaults to `excelLike`.\n\nThe other values are `none` and `copyOnly`.\n\n`none` is used to disable auto fill.\n\nSetting `dragToAutoFill` to `copyOnly` will copy the selected cell values over and over again.\nExample: `1,b,3` and you drag the handle 6 cells further will give `1,b,3,1,b,3` as auto fill values.\nAs you can see, there is no interpolation, the selected sequence is copied again and again.\n\nThe default setting `excelLike` imitates the Excel behaviour for automatic fill values.\n\nIn most cases it will work *just fine*, but there may be some special cases.\n\nIn general, the following values can be filled in automatically: Numbers, month names and dates.\n\nSimilar to Excel, you can hold down the `alt` key before releasing the mouse button to copy the cell values. No interpolation is carried out.\n\nYou can find a complete explanation of how automatic filling works in `docs/autoFillBehavior.md`.\n\n## Known Issues\n\n- `apply and save` an unnamed file will close the editor\n\t- this is because the new uri for the new file is not known and for some reason if an extension saves an unnamed file the new file is not displayed automatically\n\t\t- maybe this can be resolved when https://github.com/Microsoft/vscode/issues/43768 is closed\n\n- renaming a file while an editor is open for that file will break the reference the the source file\n\t- thus changes can no longer be saved/applied\n\t- maybe this can be resolved when https://github.com/Microsoft/vscode/issues/43768 is closed\n\n- if the source file content changes and the file is not in the current workspace (open folder) auto file content reload is not working\n\t- however, you are notified if the file content changes (e.g. outside of vs code)\n\n## Alternatives\n\nI recommend installing the `Rainbow CSV` extension, the extensions play well together!\n\n*If you want to only view csv files you can go for the extension [Excel Viewer](https://marketplace.visualstudio.com/items?itemName=GrapeCity.gc-excelviewer). It has some more advanced sorting and filtering features.*\n\n## How long will it stay in preview?\n\nThere is one things missing...\n\n- tests\n\t- especially for interaction between vs code and the webview\n\t- I added some listeners to handsontable hooks which manipulate rendering, selection...\n\n## Why not...?\n\n- use merged cells for comments (rows)\n\t- there are some problems with adding/removing rows in connection with undo \u0026 redo, sorting...\n- update handsontable to 7.x.x\n\t- with version 7 handsontable is only free for non-commercial use\n\n## Used projects\n\n- for csv parsing/writing: [papaparse](https://github.com/mholt/PapaParse)\n\t- with small custom modifications to handle comments specially\n- for grid/table element: [handsontable](https://github.com/handsontable/handsontable)\n- for ui: [vs code webview-ui-toolkit](https://github.com/microsoft/vscode-webview-ui-toolkit), [fontawesome](https://github.com/FortAwesome/Font-Awesome)\n- for shortcuts: [mousetrap](https://github.com/ccampbell/mousetrap)\n- for big numbers: [big.js](https://github.com/MikeMcl/big.js)\n- for auto fill\n  - [regression-js](https://github.com/Tom-Alexander/regression-js)\n  - [day.js](https://day.js.org/en/) for date handling\n  - (big.js for numbers)\n\n*see `thirdParty` folders*\n\nThere are some more in `package.json`. Even if they are not referenced directly, they are used e.g. for the browser build. We copy them from `node_modules` into the `thirdParty` folders.\n\n## Open the editor from other (your) extension with custom settings\n\nThere is a command `edit-csv.editWithConfig`. It can be used to open the editor with settings specified by you.\n\nAll possible settings can be found in `[project root]/csvEditorHtml/types.d.ts \u003e EditCsvConfig`. The easiest way is to copy both types `EditCsvConfig` and `EditCsvConfigOverwrite` and then call the extension command like this:\n\n```ts\n vscode.commands.registerCommand('yourExtension.yourCommand', () =\u003e {\n\tlet overwriteSettings: EditCsvConfigOverwrite = {\n\t\treadOption_hasHeader: \"true\",\n\t\t//other options, auto completion enabled\n\t}\n\n\tvscode.commands.executeCommand(`edit-csv.editWithConfig`, overwriteSettings)\n})\n```\n\nThere is one problem left: the `Edit CSV` button in the title bar (and the file right click menu action) will still use the settings set by the user...\nFor this there is the option `csv-edit.hideOpenCsvEditorUiActions`. If set to true it will hide the two ui actions. This way you can create a button from your extension and open the editor and force your settings.\n\n**Make sure to keep the type EditCsvConfig up-to-date (in case any types change)**\n\nThe extension will warn you about any unknown settings supplied but will not check the actual property values!\n\nIt will overwrite the settings configured by the user and call the same method as `edit-csv.edit` (the default when the editor is opened via the `Edit CSV` button).\n\n## How to build locally\n\nTo compile (and watch) the files in `csvEditorHtml` run\n\n```bash\ntsc -w #or just tsc to transpile only once\n# new terminal\ncd csvEditorHtml\ntsc -w #or just tsc to transpile only once\n```\n\nthen press `F5` to run the extension\n\nWhen you edit `csvEditorHtml/index.html` you need to manually copy the changes (everything in the body but without the scripts) into `src/getHtml.ts` (past into body)\n\nYou can also open `csvEditorHtml/index.html` in your favorite browser and play around *(the vs code settings are not applied in the browser)*\n\n## License\n\nCode: MIT\n","funding_links":[],"categories":["TypeScript","HarmonyOS","vscode-extension"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanisdd%2Fvscode-edit-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanisdd%2Fvscode-edit-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanisdd%2Fvscode-edit-csv/lists"}