How to create a CSV file to migrate my Commerce Products with the Feeds module? How do you create CSV files?

I have a new Drupal Commerce website and I want to migrate all my products from my previous Drupal 7 Commerce site. I want to use the Feeds module to import my products.

I have not been able to find a way "to create a CSV file". Any suggestions?


  How do I create a CSV file
  from my current drupal commerce to my new one?
You can use the Forena module. Here is a quote from that page:


  ... built of the idea of using SQL to get data out of a database and use XHTML and CSS to format it into web reports.


Here is another quote from Reasons for considering Forena, related to the "CSV" in the question here:


  Reports created by Forena ... can be saved (exported) as PDF documents with embedded graphs. Other supported formats for saving a report are CSV, XLS, DOC, HTML, etc.


So if you'd install Forena in your "old" site, then these are the steps for creating such CSV files are:


a custom SQL query (where you have the full power of SQL at your fingertips, and various extra features related to it provided by Forena, such as using report parameters, conditional SQL, etc).
a custom report (either by an admin, or by just any regular user who is either familiar with creating what is called 'FRX files', or otherwise using the WYSIWYG report editor).
saving the report in (eg) CSV format, using one of the typical hyperlinks to do so in a report.


These steps do not require any PHP coding.

Bonus: instead of CSV format, you also have an option to format it as either XML or JSON. For more details on that, refer to "How to add a link to the CSV download to my module page, for a report created with Forena?".

Alternative: not sure if it would fit your requirements, but you could also use the Feeds integration of Forena. In this case you'd install Forena in your new site, and use Forena to enable Feeds to just go get your data in your old site. Checkout the video tutorial about this topic (specific to this Feeds integration).

For an online demo (prior to installing/testing Forena), checkout these links:


Reporting samples, about data stored in some SQLite database, and including things like drill down reports, creating charts (using the PHP SVG Graph library), etc.
Forena Documentation, which you also get in your own site after installing the module).


Disclosure: I'm a co-maintainer (not owner ...) of this module,
I hope this does not violate the site's policy on self-promotion.