
XmlElement field9 = doc.CreateElement("Field") XmlElement field8 = doc.CreateElement("Field") įield8.SetAttribute("Name", "Effective_x0020_Date") ĭt = Convert.ToDateTime(dr.ToString()) XmlElement field7 = doc.CreateElement("Field") įield7.SetAttribute("Name", "Contract_x0020_Description") įield7.InnerText = dr.ToString() XmlElement field6 = doc.CreateElement("Field") įield6.SetAttribute("Name", "Type_x0020_of_x0020_Contract") įield6.InnerText = dr.ToString() XmlElement field5 = doc.CreateElement("Field") įield5.SetAttribute("Name", "Customer_x0020_Name") įield5.InnerText = dr.ToString() XmlElement field4 = doc.CreateElement("Field") įield4.SetAttribute("Name", "SAP_x002f_Legacy_x0020_Pricing_x") įield4.InnerText = dr.ToString()

XmlElement field3 = doc.CreateElement("Field") įield3.SetAttribute("Name", "Executing_x0020_Site") įield3.InnerText = dr.ToString() XmlElement field2 = doc.CreateElement("Field") įield2.InnerText = dr.ToString() XmlElement field1 = doc.CreateElement("Field") XmlElement el1 = doc.CreateElement("Method") XmlElement elBatch = doc.CreateElement("Batch") ĮlBatch.SetAttribute("OnError", "Continue") ĮlBatch.SetAttribute("ListVersion", "1") Using (DbDataReader dr = command.ExecuteReader())

Using (DbCommand command = connection.CreateCommand())Ĭommand.CommandText = "SELECT * FROM " Using (DbConnection connection = factory.CreateConnection())Ĭonnection.ConnectionString = connectionString String connectionString = Source=c:\contracts.xls Extended Properties=""Excel 8.0 HDR=YES """ ĭbProviderFactory factory = DbProviderFactories.GetFactory("") XmlNode contacts = list.GetList("Contracts")

Namespace ReadFromExcelImportToSharePoint
