This project is read-only.
1

Closed

Cannot import

description

I tried to import users with custom profile properties, no success. (I exported the current users in CSV and XML format, and added users with the same template)

I also tried to import users using the example XML and CSV formats... without any custom profile properties.

I consistently get errors.

Event log:
Message:A column named '"' already belongs to this DataTable.
StackTrace:
InnerMessage:A column named '"' already belongs to this DataTable.
InnerStackTrace:
at System.Data.DataColumnCollection.RegisterColumnName(String name, DataColumn column)
at System.Data.DataColumnCollection.BaseAdd(DataColumn column)
at System.Data.DataColumnCollection.AddAt(Int32 index, DataColumn column)
at forDNN.Modules.UsersExportImport.MainControl.CSV2Table(Byte[] lstBytes)
at forDNN.Modules.UsersExportImport.MainControl.DoImport()
at forDNN.Modules.UsersExportImport.MainControl.btnImport_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

With XML:
InnerMessage:Column 'Prefix' does not belong to table .
InnerStackTrace:
at System.Data.DataRow.GetDataColumn(String columnName)
at forDNN.Modules.UsersExportImport.MainControl.XML2Table(Byte[] lstBytes)
at forDNN.Modules.UsersExportImport.MainControl.DoImport()
at forDNN.Modules.UsersExportImport.MainControl.btnImport_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)





So I deleted the Prefix column.. and get this...
InnerMessage:Column 'Facebook' does not belong to table .
InnerStackTrace:
at System.Data.DataRow.GetDataColumn(String columnName)
at forDNN.Modules.UsersExportImport.MainControl.XML2Table(Byte[] lstBytes)
at forDNN.Modules.UsersExportImport.MainControl.DoImport()
at forDNN.Modules.UsersExportImport.MainControl.btnImport_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Closed Apr 4 at 9:41 AM by fordnn

comments

fordnn wrote Apr 28, 2015 at 7:21 AM

It seems you have "empty" columns in your Excel or CSV file. Can you just copy/paste cells with data only into the new and clear Excel file? More help we can provide if you send us an example of the file to support@fordnn.com. Sergey, forDNN Team

goombamd wrote Apr 30, 2015 at 7:38 PM

OK, so I added numbers or text instead of BLANK cells in the XML file.
For example, if I didn't have a Facebook link,I just added http://google.com
If I didn't have a telephone, I added 000-000-0000

Now, it does not throw an error in the event log. However, I get the following error.
I tried making the AffiliateId 0, I tried leaving it blank, and I tried taking out the column altogether.
Same issues re: AffiliateId table.

Total users to import: 28
Success users have been imported: 0
Line 1. Import error "Column 'AffiliateId' does not belong to table ."
Line 2. Import error "Column 'AffiliateId' does not belong to table ."
Line 3. Import error "Column 'AffiliateId' does not belong to table ."
Line 4. Import error "Column 'AffiliateId' does not belong to table ."
Line 5. Import error "Column 'AffiliateId' does not belong to table ."
Line 6. Import error "Column 'AffiliateId' does not belong to table ."
Line 7. Import error "Column 'AffiliateId' does not belong to table ."
Line 8. Import error "Column 'AffiliateId' does not belong to table ."
Line 9. Import error "Column 'AffiliateId' does not belong to table ."
Line 10. Import error "Column 'AffiliateId' does not belong to table ."
Line 11. Import error "Column 'AffiliateId' does not belong to table ."
Line 12. Import error "Column 'AffiliateId' does not belong to table ."
Line 13. Import error "Column 'AffiliateId' does not belong to table ."
Line 14. Import error "Column 'AffiliateId' does not belong to table ."
Line 15. Import error "Column 'AffiliateId' does not belong to table ."
Line 16. Import error "Column 'AffiliateId' does not belong to table ."
Line 17. Import error "Column 'AffiliateId' does not belong to table ."
Line 18. Import error "Column 'AffiliateId' does not belong to table ."
Line 19. Import error "Column 'AffiliateId' does not belong to table ."
Line 20. Import error "Column 'AffiliateId' does not belong to table ."
Line 21. Import error "Column 'AffiliateId' does not belong to table ."
Line 22. Import error "Column 'AffiliateId' does not belong to table ."
Line 23. Import error "Column 'AffiliateId' does not belong to table ."
Line 24. Import error "Column 'AffiliateId' does not belong to table ."
Line 25. Import error "Column 'AffiliateId' does not belong to table ."
Line 26. Import error "Column 'AffiliateId' does not belong to table ."
Line 27. Import error "Column 'AffiliateId' does not belong to table ."
Line 28. Import error "Column 'AffiliateId' does not belong to table ."

goombamd wrote Apr 30, 2015 at 10:32 PM

I figured it out.
Somehow excel wasn't exporting AffiliateId="" even though I had a blank column.
The excel export is tricky.
Also, in my blank spaces in Excel, I did a "Find and Replace" for "" and replaced with "REPLACEWITHBLANKSPACE"

Then, after exporting the XML, I opened with notepad and did a Find and Replace to replace "REPLACEWITHBLANKSPACE" with ""

It's a problem with Excel more than anything.. I can't believe excel doesn't export blanks and there's no easy way I could figure out to do this..

fordnn wrote May 1, 2015 at 11:00 AM

Thank you for this info! Can we help somehow to fix your problems with Excel?