Questions tagged [csv]

Comma-separated values or character-separated values: a text format to store tabular data. Often used to import or export MySQL tables.

Filter by
Sorted by
Tagged with
0
votes
0answers
33 views

Creating export to CSV function but responding as expected

I have added the following code to function.php to create a CSV download of a PODs Framework PODs with the name solution. For some reason - which I do not understand - the CSV download is not ...
0
votes
0answers
18 views

wp_insert_post when looping through large file

I seem to be getting an issue with wp_insert_post performing really slow when looping through a large array (130k rows). I've tried a few different tricks speed up the upload such as settings ...
0
votes
1answer
13 views

Creating categories while importing via CSV

I have a CSV that I am importing via a custom plugin I made. This will create a CPT that has a few ACF fields. This CPT is called Formula, and it has a taxonomy associated with it called formula_type. ...
0
votes
1answer
13 views

Page is loading after submit before the file is processed

I have built a user import page that imports via csv file upload. The issue I am having is that the page is loading before all of the rows (user information) is finished processing/ inserting users. ...
0
votes
1answer
47 views

help with really simple csv importer

( sorry for the title, but i dont know how to explain this as a title ^^ ). I'm using really simple csv importer to bulk import data in my site, using Advanced custom fields. So i need to import ...
0
votes
0answers
20 views

How do I bulk upload csv file containing Custom Text Fields data?

I'm creating an online store with WooCommerce. I have 2000 products that need up to 5 custom text fields so customers can personalise before adding to cart. All products are already on the site. I ...
0
votes
1answer
45 views

Export to csv adding html to file

I am trying to export results to a csv file using the following code. The export appears to work, but when I open the file, it contains the html code from the page. Any help is appreciated. ob_start()...
0
votes
0answers
27 views

How do I get data from my database into my Custom Export Field

I am trying to get data from my database to export to a XML or CSV File by using a custom query. This is my function with the query : <?php function get_workhours($ID){ $sql = $wpdb->...
0
votes
1answer
30 views

How can I reference external attachments without breaking core WordPress files?

I am developing a site that uses WooCommerce & WordPress to show a fair amount (10,000+) products, and can't accommodate the size of all the images for the products. So, I'm leaving the images on ...
0
votes
0answers
38 views

How to get stats_get_csv for yesterday only

I'm looking to get Jetpack stats for yesterday, but am having trouble figuring out how to get yesterday from stats_get_csv. stats_get_csv has two seemingly relevant parameters, "days" which says how ...
0
votes
1answer
80 views

Can't upload CSV file to plugin directory using custom upload form in admin panel

I need some assistance here. So far, i build a plugin, that are able to import data of a CSV file and parse it into fields of a custom post type. At this point, I would like to make a form to ...
0
votes
0answers
13 views

Formatting CSV for Redirecting Drupal to WordPress URLs

I have a list of Drupal URLs in Col A of a CSV that have had words like "and" "or" "but" taken out of the URL string. I have a list of the same WordPress URLs in Col B CSV that have the entire URL ...
1
vote
1answer
22 views

How do I update a field of a meta box?

While parsing data from a CVS file into a custom post type, i would like to parse data into the fields of a meta box, that I created. The meta box fields are normally updated like this: function ...
0
votes
0answers
16 views

Second CSV Import Overwriting Original Attributes (rather than adding new)

I imported some products using the WooCommerce Import tool under “Products”. I originally imported the products as “simple” with some Attributes eg. Brand, Shape etc. This was successful. For each ...
0
votes
0answers
36 views

Unable to update the meta boxes with multiple fields

I successfully build a function, that is able to import data from a CSV into posts of a Custom Post Type (CPT). I am able to parse data into the native Title and Description fields, but it fails, when ...
0
votes
0answers
34 views

Updating the database after parsing CSV document

Im trying to update the database based in a CSV document, if the first value in the CVS row is equal or greater than 300, it should update the database, and so on....but I cant get it to work, the ...
0
votes
0answers
24 views

How to update a custom post's field value based on matching another field's value with two different custom post types

I have a custom post type named "customers" that contains numerous custom fields, two of which are "customerid" and "company_name". I have a second custom post type named "estimates", which contains ...
0
votes
2answers
226 views

Query a custom taxonomy in a function to create an csv file

I a problem with getting the query for custom taxonomy to work in this function. The $filter is filled with data but the get_posts() does not use it? The query works without the tax_query and there ...
0
votes
1answer
64 views

Undo WooCommerce CSV import

I've done a CSV import through the WooCommerce import function. Unfortunately, there's something what went wrong. By now, almost all products don't show any data as it has somehow been overwritten. I'...
0
votes
0answers
22 views

How to map data on CSV to web pages?

Like Contact information, descriptions, budget, prices, other numbers, on a CSV or spreadsheet, how to link it to WordPress web page? I'm using cpanel, WordPress, Tablepress plugin, elementor page ...
1
vote
0answers
61 views

Export Custom Report as CSV

I want to build an admin panel that works like this: User enters a date range and clicks "Show Report". The query results are then displayed in the admin panel. User clicks "Export to CSV" and a CSV ...
0
votes
1answer
37 views

Having issue on Loading Meta Data From CSV to CPT

I have a custom post type which has one Title, and two meta box custom fields as $price = isset( $we_productMetas['price_box'] ) ? esc_attr( $we_productMetas['price_box'][0] ) : ''; $color = isset( $...
0
votes
0answers
166 views

How to Upload CSV Data into Custom Post Type Data with Metabox programmatically

I have a Custom Post Type called movies which had only title enabled from post support and 3 custom field of metabax as box office, year, and director like now I have like 150 rows CSV formatted ...
1
vote
0answers
63 views

How to make a wordpress site multilingual by uploading a translated CSV file that has the traslations?

I have a website which is in french and i need the website to be read by my users in english too. How do i achieve that without making or creating entirely new pages with english translations. I have ...
1
vote
1answer
441 views

Importing CSV into database table not working?

global $wpdb; if (isset($_POST["import"])) { $fileName = $_FILES["file"]["tmp_name"]; if ($_FILES["file"]["size"] > 0) { $file = fopen($fileName, "r"); while (($column = fgetcsv($file, ...
1
vote
1answer
34 views

How to handle a CSV with 65,000+ rows and make it searchable?

I have a csv of 65,000+ rows. Each row only has two fields, an ID code and a Description. This csv will get updated every year or so. The users needs to be able to type in the code and get a list of ...
0
votes
0answers
30 views

multiple string replace of post's content for large data

I am trying to replace all player name mentioned into my post's content with related player's profile link. And all the player name and player links saved in a csv file. Example: player one,www....
0
votes
1answer
27 views

Imported posts for cpt are imported as scheduled, not published [SOLVED]

I'm importing posts to a plugin's custom post type for Stores. As I had roughly 1500 stores to upload, I decided to make it via csv/txt bulk import. I created one post, and exported it to have the ...
1
vote
1answer
942 views

How to export custom database data to excel file

Hi everyone I have the code below, but when I click on the link generated a new page is open with 0 display on it. What I'm doing wrong? function list_reservation_to_csv() { global $wpdb; $...
1
vote
0answers
130 views

Huge category CSV import does not work

I have a 1.5 MB (with about 20.000 line) CSV file and I would like to import this into my new WordPress site. The code below does not create all of the categories, only some of them. I already ...
1
vote
0answers
42 views

Manipulate CSV data during upload, is it possible?

I am generating membership invoices from client supplied membership list CSV. I created a custom post type, and I'm using wpallimport to upload the CSV data into that custom post type. Each row in the ...
1
vote
0answers
17 views

How to import .csv file with descriptions to a gallery in media?

I have this CSV file that I want to import into an image gallery I have in my "media" tab. Images are named like 79.jpg, 80.jpg, 81.jpg, and so on. My CSV file is ordered like this: id;;creator;...
-1
votes
1answer
2k views

Reading CSV values and showing them in PHP

I have a project going on and this is the first time I've encountered CSV. I've read numerous post but haven't found what I need. So we have and CSV with values like this Name,Country,Color,Pet ...
1
vote
1answer
972 views

What’s the fastest way to import products with variations in WooCommerce (CSV, XML, …) [closed]

I’m setting up an onlineshop for a customer and I’m at a point I need some advice from you. I have about 4,000 products to import into my WooCommerce shop (using version 3.2.6). Each of the 4,000 ...
0
votes
1answer
37 views

Pull specific data from CSV

I'm building a website, and client has specific request. Open source app has .csv file providing bunch of data. They want to pull some fields from that csv and to place it in on wordpress website. ...
0
votes
0answers
64 views

Delete all custom posts then upload a new CSV of events

I was having an issues with deleting all posts and then re-uploading a new CSV of events to a custom post type 'events' and managed to put together a solution together that works.Hopefully this will ...
0
votes
1answer
221 views

how can i import the csv file in wordpress woocommerce.?

my client has a Wordpress website and we are facing some issue while importing the products with variations in the website. the website link is https://www.primadonsanddonnas.com. The CSV file ...
0
votes
1answer
76 views

Import user data using CSV

I want to import user information using a CSV file. I am using the BP Groups Import User plugin. The challenge is to add the first name and last name columns in the CSV file but I cannot get the ...
4
votes
1answer
1k views

Creating 20,000 Posts or Pages using a .csv file?

Here's my challenge: I have a .csv file which contains 20,000 rows of data. Each row contains 5 columns of data on an particular individual. I need each row (each person) to be populated into a ...
0
votes
0answers
554 views

Updating database with CSV file and Cron job

I have two ecommerce websites. They sell the same products at the same prices. One is WordPress (woocommerce). The other has a .NET backend and a MSSQL database. I need to import the stock level from ...
0
votes
0answers
11 views

Products aren't detected if CSV importer are used

I created a plug to import a CSV personalized. The problem is that a plugin to create animation doesn't detect these products until I open the product on backend and update it. Is there a way to ...
0
votes
2answers
685 views

Creating custom page template from existing PHP site

I have an existing site that has 5 or 6 php pages, with HTML mixed in for some tables and forms. The biggest purpose of the site is to upload CSV files into a database table and then on other pages ...
0
votes
0answers
600 views

Front end/Database connection in WP

I've been tasked with a project where the user needs to access the front end admin page that I've created and upload a CSV (1-3 daily). This Information needs to go into a database and be split into ...
0
votes
1answer
437 views

Download full html page with CSV export plugin

I am making a csv exporter plugin for my own need. But the problem I have is that, it download whole page as html when I click Export button. Here is my code. Please help me to slove this problem. ...
1
vote
1answer
898 views

Why is file_get_contents returning page source?

I'm trying to write a shortcode in my theme's functions.php file that can display the contents of a CSV file on our server. I'll worry about reading the CSV file into arrays and such later, but for ...
1
vote
1answer
178 views

file_exists() acting weird

I'm trying to pull some data out of a csv file but I'm stuck because file_exists() says the file doesn't exist when used with get_template_directory_uri(). This is the short code: function ...
5
votes
2answers
6k views

Allow CSV files to be uploaded

I am trying to allow CSV files in a dashboard menu page like this.. <form method="post" enctype="multipart/form-data"> <input type="file" name="csv_file" id="csv_file" multiple="false" ...
1
vote
1answer
53 views

Pulling Data from CSV vs. pulling data from database

I developed a custom post type with a custom taxonomy for my WP theme and I need to add a number to associate with my taxonomy. Example: The taxonomy is "store" and the average savings for that ...
2
votes
1answer
74 views

Creating a Wordpess Plugin that writes data to a csv file. The data doesn't show in the csv file?

I am writing my first Wordpress Plugin that should simply write data to a csv file. This is the code, I can't figure out why the data won't write to the csv file? add_action('admin_menu', '...
0
votes
0answers
388 views

Force CSV download with template_redirect

I'm struggling to get a dynamically-generated CSV to download with a template_redirect. It seems to work (if not this exact version, another similar version) when it does not go through Wordpress, e.g ...