csv of filtered values

csv filter in front end

CSV Filter – only shows on front end if csv link enabled & filtering enabled

CSV filter button if filtering and csv enabled - always show sin admin

CSV filter button if filtering and csv enabled – always shows in admin

In addition to csv extracts of full list data, csv subset extracts of real time filtered records is available.    Changes in recent version upgrades:

= Version 2.9.1 =

  • fixes bug – CSV filter now only shows
    • on front end if csv ticked and filtering enabled
    • in admin if filtering enabled

= Version 2.9 =

  • adds button to extract a csv version of a filtered list. Works with column value filtering. Not suggested for field value filters (deprecated soon).

= Version 2.8 =

  • blanks and non blanks in the filter dropdown will now only show IF you have blanks in your data.
  • fix: warning message on field filtering, caused by input validation function being applied to an array

= Version 2.7 =

  • added comment text to alphabetical navigation links so that one could tell which field was being indexed.
  • added code so that non labelled values will show with a count too, or as ‘novalues’ css class with no hyperlink  (even I am struggling to understand what was happening here when I read this – apologies – whatever it was hopefully made things better! )
  • added code to identify indices not allowed for in navigation (only shows in debug) to help flush out funny data. (Last names with double quotes etc…)

Export wordpress users to csv using amr users plugin

The “amr users” plugin allows one to create a wide variety of user lists accessing as little or as much of the user data as you like. One can then export these views for further analysis and manipulation.

There are two (and a half?) ways to export users to csv using amr-users

The overview screen where user lists can be managed

‘Public’ lists csv export

  • will generate an actual file that can be downloaded
  • a export icon will appear at the bottom of the list (both front pages and admin pages)
  • the list has been ‘ticked’ as public in the overview screen
  • you may or may not have it available on a front page in a shortcode (just because it is ticked public, does not mean that the general public can access it – it must also be in a shortcode in a page
  • the csv file location is obfuscated (hidden, but accessible)
  • you should use good sense in deciding what data should be made available on that list

Non Public Lists

Admin (non public) csv or txt export users options

  • In  order to protect the user data, non public lists are only written to csv at request time.
  • The ‘file’ is sent generated and sent direct to your browser.  No file is stored on the server.
  • This non-stored file option may have implications for people who have magic quotes enabled on their server.

Non Public csv export as .txt file

  • For people who use excel and have troubles with double quotes in csv.
  • Will export the csv list as a .txt file to force excel to use the text import wizard to allow control over the import options


CSV Export, slashes, magic quotes on, security

To those using the user lists plugin and complaining about extra slashes, I apologise for not realising that it is because your host must have magic quotes enabled.  Please read the php link. The php manual says:  Relying on this feature is highly discouraged.

I have looked into it and it seems that because , with it enabled, php adds the slashes at the very last minute (when you click export cvs), there is no way I can stop it from kicking on.

The only possibility may be to write the csv to a file on the server.  I specifically do NOT want to do this for non public lists, because

  • it is user data and should be kept private, not written to a file on a public server
  • plugins cannot easily access ‘private’ folders to keep such a file private

So either you could try seeing if there is a way to switch it off at your host, or do a search and replace in the csv file, or make the list public (if this is ok with your users and your privacy agreement with them)

Ask your host to disable magic quotes ….Or try my very good hosts – they are reliable, helpful. We’ve been with them for more than 10 years now with no complaints.

Exporting a wordpress user list to a csv file and excel

A number of people using the amr-users plugin and who are Excel users, seem to need help when it comes to importing the csv file into excel.  Open Office and Google Docs users seem to be fine.

As far as I can make out, this seems to be because:

  1. their hosts might have magic quotes enabled.  Ask them to disable it!
  2. their default excel csv import settings do not match the csv file settings (comma separated, and all fields double quotes delimited – this is a standard csv usage.)
  3. they do not know how to get to the text import wizard (Office 2007 in particular is non obvious)

CSV Text Import Screen 2

Office 2007

In Office 2007, it seems that the trick is to rename the file to a .txt file, instead of a .csv.  Excel 2007 should then automatically load the text import wizard.  You may find other benefits to, in being able to define how excel should handle the data in each column.

Note:   When Excel opens a .csv file, it uses the current default data format settings to interpret how to import each column of data. If you want more flexibility in converting columns to different data formats, you can use the Import Text Wizard. For example, the format of a data column in the .csv file may be MDY, but Excel’s default data format is YMD, or you want to convert a column of numbers that contains leading zeros to text so you can preserve the leading zeros. To run the Import Text Wizard, you can change the file name extension from .csv to .txt before you open it…

Using the Excel Text Import Wizard:

Get the text import wizard up

  • either opening from the menus (Office 2003 – Click Data → Get External Data) or
  • by renaming file to a .txt (Offfice 2007) and then double clicking on it
  • Choose delimited, Click next
  • Choose Delimiter: comma
  • Choose text qualifier: “, Click next,
  • Other options as you wish
  • Click Finish

Other resources:

amr users plugin for user reporting launched

amr-users allows an administrator to design their own users lists or reports. It offers a basic set to start that are highly configurable users listings by meta keys and values, comment count and post count.   It includes display, inclusion, exclusion, sorting configuration and an option to export to CSV .

The plugin will handle those meta data values that are objects (such the “your members” fields)  or arrays and allow allow one to use those values too, as though they were straight meta values.

Admin area for administrator only

The admin settings area is aimed at an administrator, who will design and setup the reports for less skilled editors or website managers.  Some lists are provided pre-configured to get you going – you can add more or change these.

Configured User listings for editors

The first field of each listing will offer a link to edit that user.

The fields you see listed will vary depending on the plugins that you have in use, and on the meta data that the plugins may have created.  In the Screenshots you will some data from subscribe 2, register plus and your members plugins.

If you have very large numbers of users, the post count and particularly the comment count (no wordpress cacheing) listings may be slow.  If very slow, please contact me and we can consider ways to cache the data.  If you wanted to list this data on the front end, the performance would have to be improved.  for now it is assumed to be admin/editor use only.


It should be up at wordpress soon, in the meantime, there is a zip file :amr-users plugin


Default List 1 View

Default List 1 View

Default List 2 view

Default List 2 view

Default List 3 view

Default List 3 view

Admin 1

Admin 1

Admin 2

Admin 2

Admin for list 3

Admin for list 3

Exported to CSV

Exported to CSV

Imported CSV with no worries into Open Office Spreadsheet

Imported CSV with no worries into Open Office Spreadsheet