{"id":19348824,"url":"https://github.com/adrianbj/tablecsvimportexport","last_synced_at":"2025-04-23T06:30:42.243Z","repository":{"id":21502923,"uuid":"24821901","full_name":"adrianbj/TableCsvImportExport","owner":"adrianbj","description":"Processwire module for admin and front-end importing and exporting of CSV formatted content for Profields Table fields.","archived":false,"fork":false,"pushed_at":"2025-01-17T18:30:39.000Z","size":154,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T09:22:17.383Z","etag":null,"topics":["csv-export","csv-import","processwire","table"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrianbj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-05T17:51:40.000Z","updated_at":"2025-01-17T18:30:30.000Z","dependencies_parsed_at":"2022-08-21T15:21:08.096Z","dependency_job_id":null,"html_url":"https://github.com/adrianbj/TableCsvImportExport","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianbj%2FTableCsvImportExport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianbj%2FTableCsvImportExport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianbj%2FTableCsvImportExport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianbj%2FTableCsvImportExport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianbj","download_url":"https://codeload.github.com/adrianbj/TableCsvImportExport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250384650,"owners_count":21421765,"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-export","csv-import","processwire","table"],"created_at":"2024-11-10T04:23:13.985Z","updated_at":"2025-04-23T06:30:41.979Z","avatar_url":"https://github.com/adrianbj.png","language":"PHP","readme":"Table CSV Import / Export\n==========================\n\nProcesswire module for admin and front-end importing and exporting of CSV formatted content for Profields Table fields.\n\nhttps://processwire.com/talk/topic/7905-profields-table-csv-importer-exporter/\n\nAccess to the admin import/export for non-superusers is controlled by two automatically created permissions: table-csv-import and table-csv-export\n\nAnother permission (table-csv-import-overwrite) allows you to control access to the overwrite option when importing.\n\nThe overwrite option is also controlled at the field level. Go to the table field's Input tab and check the new \"Allow overwrite option\" if you want this enabled at all for the specific field.\n\nFront-end export of a table field to CSV can be achieved with the exportTableCsv() method:\n```\n\u003c?php\n// export as CSV if csv_export=1 is in url\nif($input-\u003eget-\u003ecsv_export==1){\n\t$modules-\u003eget('ProcessTableCsvExport'); // load module\n\t$options = array(\n        'delimiter' =\u003e ',',\n        'enclosure' =\u003e '\"',\n        'extension' =\u003e 'csv',\n        'multipleValuesSeparator' =\u003e '|',\n        'namesFirstRow' =\u003e true,\n        'columns' =\u003e array('field1','field2'), // columns to export can be index starting at 1, or column names\n        'selector' =\u003e 'field1%=foo, field2%=bar'\n    );\n\t$p-\u003eexportTableCsv('field_name', $options);\n}\n// display content of template with link to same page with appended csv_export=1\nelse{\n   include(\"./head.inc\");\n\n   echo $page-\u003efield_name-\u003erender(); //render table - not necessary for export\n   echo \"\u003ca href='./?csv_export=1'\u003eExport Table as CSV\u003c/a\u003e\"; //link to initiate export\n\n   include(\"./foot.inc\");\n}\n```\n\nFront-end import can be achieved with the importTableCsv() method:\n```\n$modules-\u003eget('TableCsvImportExport'); // load module\n$options = array(\n    'delimiter' =\u003e ',',\n    'enclosure' =\u003e '\"',\n    'convertDecimals' =\u003e false,\n    'multipleValuesSeparator' =\u003e '|',\n    'namesFirstRow' =\u003e false\n);\n$page-\u003eimportTableCsv('field_name', $csvData, $options);\n```\n\n#### Support forum:\nhttps://processwire.com/talk/topic/7905-profields-table-csv-importer-exporter/\n\n## License\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n\n(See included LICENSE file for full license text.)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianbj%2Ftablecsvimportexport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianbj%2Ftablecsvimportexport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianbj%2Ftablecsvimportexport/lists"}