Unexpected error

Jul 29, 2011 at 12:49 PM

Hi, i need any help for the follow issue,

I want import from excel file, to sharepoint web page.
But i receive unexpected error, because the first fields in Sharepoint "fieldOne" have type Lookup with Picker. How can i resolve this issue.
I present the source example:

                XmlDocument xDoc = new XmlDocument();
                XmlElement xEle = xDoc.CreateElement("Batch");
                xEle.SetAttribute("OnError", "Continue");
                xEle.SetAttribute("ListVersion", "1");
                xEle.SetAttribute("ViewName", "");

                foreach (DataRow x in dt.Rows)
                {
                    xEle.InnerXml = "<Method ID='1' Cmd='New'>" +
                                        "<Field Name='fieldOne'>" + x[0] + "</Field>" +
                                        "<Field Name='fieldTwo'>" + x[1] + "</Field>" +
                                        "<Field Name='fieldThree'>" + x[2] + " </Field>" +
                                    "</Method>";
                }

                try
                {
                    System.Xml.XmlNode xNode;
                    xNode = lst.UpdateListItems("ListNameOnSharePoint", xEle);
                    lblSuccessMessage.Visible = true;
                    lblSuccessMessage.Text = xNode.InnerXml;

                }
                catch (System.Web.Services.Protocols.SoapException ex)
                {
                    lblErrorMessage.Visible = true;
                    lblErrorMessage.Text = "Erro aplicacional: " + ex.Detail.InnerXml;
                }

 thx