{"id":1896619,"date":"2019-10-18T13:19:39","date_gmt":"2019-10-18T17:19:39","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/importing-data-from-a-csv-file-2\/"},"modified":"2025-05-27T08:59:18","modified_gmt":"2025-05-27T12:59:18","slug":"importing-data-from-a-csv-file","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/importing-data-from-a-csv-file\/","title":{"rendered":"Importing Calendar Data From a CSV File"},"content":{"rendered":"\n<iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/FapyBdRXdEk\" title=\"YouTube video player\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"\" width=\"560\" height=\"315\" frameborder=\"0\"><\/iframe>\n\n\n\n<p>The Events Calendar includes a CSV importer tool which allows you to import events, venues, and organizers into your site&#8217;s calendar. This is a great way to quickly and easily add a lot of content to your calendar all at once.<\/p>\n\n\n\n<p>The importer is part of our full-featured <a href=\"https:\/\/theeventscalendar.com\/product\/event-aggregator\/\" target=\"_blank\" rel=\"noreferrer noopener\">Event Aggregator<\/a> plugin, which, if you purchase a license, can also import from other sources like iCal. <strong>The CSV import tool is free, however, and included when you install The Events Calendar.<\/strong><\/p>\n\n\n\n<p>Before we get started, it&#8217;s worth noting that importing events with a CSV file will update existing events if it meets <strong>all<\/strong> of the following conditions:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-for-all-day-events\">For All-Day Events:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The event <strong>title<\/strong> is identical.<\/li>\n\n\n\n<li>The event is marked as an <strong>all-day<\/strong> event.<\/li>\n\n\n\n<li>The <strong>start date<\/strong> (date only, from <code>_EventStartDate<\/code>) matches exactly.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-for-timed-non-all-day-events\">For Timed (Non-All-Day) Events:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The event <strong>title<\/strong> is identical.<\/li>\n\n\n\n<li>The <strong>start date and time<\/strong> are exactly the same.<\/li>\n\n\n\n<li>The <strong>end date and time<\/strong> are exactly the same.<\/li>\n<\/ul>\n\n\n\n<p>These conditions help ensure that only genuinely identical events are updated during import.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"csv-files\">You lost me at CSV&#8230;<\/h2>\n\n\n\n<p>CSV is a file format that stands for <em>comma-separated values<\/em>. These files are often produced by spreadsheet applications like Excel and Numbers, but they can come from other sources as well. This file type converts a spreadsheet file from a format that uses cells to separate content to a file format that separates content using commas.<\/p>\n\n\n\n<p>For example, a spreadsheet file with the following cells:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Cell 1<\/td><td>Cell 2<\/td><td>Cell 3<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2026 would be converted to this in CSV:<\/p>\n\n\n\n<p><code>Cell 1,Cell 2,Cell 3<\/code><\/p>\n\n\n\n<p>This is important because it makes the data contained in the spreadsheet readable to importing tools like Event Aggregator.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"save-file\">Generating a CSV file<\/h2>\n\n\n\n<p>Saving a spreadsheet as a CSV file is often an option in the save settings of the application (such as Microsoft Excel) you are using. In most cases, you will go to <strong>File<\/strong> \u2192&nbsp;<strong>Save As<\/strong> from your application and select the option to save the file in CSV format.<\/p>\n\n\n\n<p>This is the file you will use to import events to The Events Calendar. You can learn more about the specific fields available and download example files in <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/k\/csv-file-examples-for-importing\/\" target=\"_blank\" rel=\"noreferrer noopener\">another article<\/a>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>\ud83d\udca1<\/strong> Some versions of Microsoft Excel may export CSV files with non-standard separator characters (such as semicolons) by default. To ensure that your CSV exports can be successfully imported, please ensure that your Excel settings are configured to export CSV files with the comma (<code>,<\/code>) separator. Please refer to the documentation for your software if you should have any questions about how to adjust this setting.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"import\">Importing a CSV File<\/h2>\n\n\n\n<p>Follow the step-by-step instructions below to learn how to import data from a CSV file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Go to the Import screen<\/h3>\n\n\n\n<p>From the WordPress dashboard, navigate to <strong>Events<\/strong>&nbsp;&nbsp;\u2192&nbsp;<strong>Import<\/strong> in the left-hand menu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Select CSV as the import origin<\/h3>\n\n\n\n<p>The first field on the screen will ask you to identify the source of your new import. Select <strong>CSV File<\/strong> from the list of options.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2016\/10\/csv_file_import_origin.png\" alt=\"Selecting &quot;CSV File&quot; as the import origin when importing from Event Aggregator\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Select the type of content to be imported<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2016\/09\/kb-ea-csv-step3.png\" alt=\"kb-ea-csv-step3\"\/><\/figure>\n\n\n\n<p>By default, there are three options for data types that can be imported using The Events Calendar.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Events:<\/strong> Posts that will be identified as events to be published on The Events Calendar.<\/li>\n\n\n\n<li><strong>Organizers:<\/strong> Data for saved event organizers that can be associated with an event.<\/li>\n\n\n\n<li><strong>Venues:<\/strong> Data for saved event locations that can be attached to events.<\/li>\n<\/ul>\n\n\n\n<p>If you are planning to import venue and organizer information with your events, then you will need to import the CSV file for those venues and organizers <em>before<\/em> importing events. This will ensure that the data for both venues and organizers are available so The Events Calendar knows what information to associate with an event when it is imported.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>\ud83d\udca1<\/strong> If you are using Event Tickets and\/or Event Tickets Plus, you will also have an option to import RSVPs or tickets via CSV.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>RSVPs<\/strong> option will appear on the list if you use the Event Tickets plugin.<\/li>\n\n\n\n<li><strong>Tickets<\/strong> option will appear on the list if you&#8217;re using the following plugins: Event Tickets, Event Tickets Plus, and WooCommerce.<\/li>\n<\/ul>\n\n\n\n<p>You&#8217;ll need to import your ticket files <em>after<\/em> you&#8217;re done importing events.<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"434\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/RSVPs-and-Tickets-options.png\" alt=\"\" class=\"wp-image-1961487\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/RSVPs-and-Tickets-options.png 618w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/RSVPs-and-Tickets-options-300x211.png 300w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Select the file to upload<\/h3>\n\n\n\n<p>Remember when you created your CSV file? The next step is to click the <strong>Upload<\/strong> button and select the file from the appropriate location on your hard drive.<\/p>\n\n\n\n<p>The CSV file you choose will be saved to the WordPress media library and will remain available for future use.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Preview the content and map your fields<\/h3>\n\n\n\n<p>Once you have selected the CSV file to upload, click the Preview button. This will generate a preview of a <strong>portion of your CSV file<\/strong>.&nbsp;Notice that the import preview is in a table format with column headings and dropdown fields. <strong>Before you can import the information, you&#8217;ll need to &#8220;map&#8221; the information from your file to the corresponding content fields in The Events Calendar.&nbsp;<\/strong>The display only includes some of the rows from your CSV file because you only need to see enough to map the fields properly. The actual import will include all the data in the file.<\/p>\n\n\n\n<p>The column headings in your preview match the headings in the spreadsheet that became your CSV file. Each dropdown menu contains all the different content fields for an event (or venue, organizer, or ticket, depending on the content you&#8217;re importing). <strong>For each column, use the dropdown to select the correct content field for the information in that column. <\/strong>Scroll to the right until you have mapped all of the fields that you wish to import.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2016\/09\/mapping-columns.gif\" alt=\"mapping-columns\"\/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>\ud83d\udca1<\/strong> If you followed our <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/k\/csv-file-examples-for-importing\/\" target=\"_blank\" rel=\"noreferrer noopener\">CSV file examples post<\/a>, your column names will probably match the options in the dropdown. However, the options may not match if you are using a CSV file that you exported from another source. When mapping, choose the option from the dropdown that best matches the information in the column, or you may leave the dropdown selection as <em>Do Not Import <\/em>to leave that column&#8217;s data out. You can always edit the entry later.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Run the import<\/h3>\n\n\n\n<p>Now that you&#8217;ve mapped the data, you&#8217;re almost ready to run the import. But first, you have the option to set the <strong>Publish<\/strong> status for the data:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Published:<\/strong> The content will be published to your site right away.<\/li>\n\n\n\n<li><strong>Draft:<\/strong> The content will not be published but will be available for editing after the import.<\/li>\n\n\n\n<li><strong>Pending Review: <\/strong>The content will not be published or saved as a draft but will be labeled as being ready for a WordPress editor or administrator to review before it is published.<\/li>\n\n\n\n<li><strong>Private: <\/strong>The content will be published to your site right away but will only be accessible to those who are logged into the site with sufficient permissions to view the content.<\/li>\n<\/ul>\n\n\n\n<p>You can also choose to add categories to the content from a list of existing event categories on your site. <strong>Keep in mind that this option only matters if you are currently importing events<\/strong>&#8211;it is irrelevant if you are importing organizers, venues, RSVPs, or tickets.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2016\/09\/Screen-Shot-2016-09-27-at-7.44.56-PM.png\" alt=\"Screen Shot 2016-09-27 at 7.44.56 PM\"\/><\/figure>\n\n\n\n<p>Once you&#8217;ve reviewed your settings, go ahead and press the <strong>Import All<\/strong> button!<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u26a0\ufe0f <strong>Important:<\/strong> All imported tickets will be treated as WooCommerce Tickets.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"overview\">Overview<\/h3>\n\n\n\n<p>That&#8217;s the step-by-step process for importing events into The Events Calendar. We hope you found this helpful. Here is a final screencast of the process from start to finish:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2016\/09\/kb-ea-csv-wrap.gif\" alt=\"kb-ea-csv-wrap\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-fixing-the-sorry-this-file-type-is-not-permitted-error\">Fixing the &#8220;Sorry, this file type is not permitted&#8221; error<\/h2>\n\n\n\n<p>Sometimes, when uploading a CSV file, you may see an error that says, &#8220;Sorry, this file type is not permitted for security reasons&#8221; error. You can resolve this error by adding the following snippet to your theme&#8217;s functions.php file.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\nadd_filter( &#039;upload_mimes&#039;, function( $types ) {\n    $types&#x5B;&#039;csv&#039;] = &#039;text\/csv&#039;;\n    return $types;\n} );\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-customizing-the-separator-character\">Customizing the separator character<\/h2>\n\n\n\n<p>By default, the separator character that is recognized for CSV files is the comma; however, you may want to use a different character. You can use the following filter to change that behavior:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_events_csv_import_file_parameters&#039;, function( $params ) {\n    $params&#x5B;&#039;delimiter&#039;] = &#039;|&#039;;\n    return $params;\n} );\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">How to Import Tickets Commerce Tickets Using CSV Import (Workaround)<\/h2>\n\n\n\n<p>Importing <strong>Tickets Commerce (TC)<\/strong> tickets using the built-in CSV import feature is not directly supported at this time. However, with a few tweaks, you can achieve this. Follow the steps below to proceed:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udccc Requirements<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>WooCommerce<\/strong> must be installed and activated temporarily for the import process to work.<\/li>\n\n\n\n<li>A custom snippet is required to map imported data correctly to Tickets Commerce.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udee0\ufe0f Step-by-Step Instructions<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. <strong>Install and Activate WooCommerce<\/strong><\/h4>\n\n\n\n<p>Even if you don\u2019t plan to use WooCommerce long-term, it must be active during the import process.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2. <strong>Add the Custom Code Snippet<\/strong><\/h4>\n\n\n\n<p>Add the following code snippet to your site using the <a>Code Snippets<\/a> plugin (recommended) or by inserting it into your <code>functions.php<\/code> file:<\/p>\n\n\n\n<p>\ud83d\udc49 <a href=\"https:\/\/gist.github.com\/andrasguseo\/703720ca04ec593fd792210bd8a287d4\" target=\"_blank\" rel=\"noreferrer noopener\">View Snippet on GitHub<\/a><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u26a0\ufe0f <strong>Important:<\/strong> Always test changes on a <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/creating-and-using-a-wordpress-staging-site\/\">staging site<\/a> before applying them to a live environment.<\/p>\n<\/blockquote>\n\n\n\n<h4 class=\"wp-block-heading\">3. <strong>Import Your CSV File<\/strong><\/h4>\n\n\n\n<p>Follow the <a href=\"#import\">same guide as shown above<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4. <strong>Verify the Tickets<\/strong><\/h4>\n\n\n\n<p>After importing, confirm that your tickets were successfully imported and are appearing as expected in your events.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5. <strong>Deactivate WooCommerce (If Not Needed)<\/strong><\/h4>\n\n\n\n<p>Once you\u2019ve confirmed the tickets are working correctly, you can deactivate and delete WooCommerce if you don\u2019t need it for anything else.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Events Calendar includes a CSV importer tool which allows you to import events, venues, and organizers into your site&#8217;s calendar. This is a great way to quickly and easily add a lot of content to your calendar all at once. The importer is part of our full-featured Event Aggregator plugin, which, if you purchase&#8230;<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[126,79],"tags":[45,212],"stellar-product-taxonomy":[154],"class_list":["post-1896619","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-event-aggregator","category-snippets","tag-importing","tag-snippets","stellar-product-taxonomy-event-aggregator"],"acf":[],"taxonomy_info":{"category":[{"value":126,"label":"Importing Events"},{"value":79,"label":"Snippets"}],"post_tag":[{"value":45,"label":"Importing"},{"value":212,"label":"snippets"}],"stellar-product-taxonomy":[{"value":154,"label":"Event Aggregator"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Jaime Marchwinski","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":126,"name":"Importing Events","slug":"event-aggregator","term_group":0,"term_taxonomy_id":126,"taxonomy":"category","description":"","parent":61,"count":23,"filter":"raw","term_order":"0","cat_ID":126,"category_count":23,"category_description":"","cat_name":"Importing Events","category_nicename":"event-aggregator","category_parent":61},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":45,"name":"Importing","slug":"importing","term_group":0,"term_taxonomy_id":45,"taxonomy":"post_tag","description":"","parent":0,"count":35,"filter":"raw","term_order":"0"},{"term_id":212,"name":"snippets","slug":"snippets","term_group":0,"term_taxonomy_id":212,"taxonomy":"post_tag","description":"","parent":0,"count":17,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896619"}],"version-history":[{"count":11,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896619\/revisions"}],"predecessor-version":[{"id":1965464,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896619\/revisions\/1965464"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896619"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}