3
Vote

Exporter Fails if Any Fields Are Selected

description

When any field or fields are selected for export, the system reports a casting error:
 
System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Collections.ArrayList'. at SharePointProfileExporter.frmMain.BuildHeader(ArrayList PropertyNames) at SharePointProfileExporter.frmMain.cmdBeginExport_Click(Object sender, EventArgs e)

comments

BobBreton wrote Sep 20, 2008 at 12:07 AM

Same, Will not export when any item is selected, just exports account

Ronalg wrote Dec 7, 2008 at 9:02 PM

In order to fix this issue, you need to go into the method that writes the header. You need to change the first line of the foreach loop. Change ArrayList to string. Then go into the guts of the loop, and change item[0] to item. This will make the export work.

wrote Jan 12, 2009 at 4:57 PM

swferrier wrote Aug 10, 2010 at 6:08 PM

"In order to fix this issue, you need to go into the method that writes the header..." I am not sure how I would do this, as I'm not a developer. Can anyone help?

Carlw wrote May 15, 2011 at 2:43 AM

ditto!!

wrote Feb 12, 2013 at 8:39 PM