Here you find the powershell script which were very useful for me.
All scripts are free of charge, use them at your own risk :
With this script you can export the correct data from the active directory to csv
Read more... Export Active directory data to csv