Hello Lawson. In order to export the content of an infopath form you would need to:
1) Open the XML
2) Read all nodes or the specific node you would like to export to excel in your case.
For reading you coud do something similar to the following sample.
file = yourfile.xml;
string xmlFileContent = System.Text.Encoding.Default.GetString(file.OpenBinary());
int index = xmlFileContent.IndexOf("<?xml");
if (index != 0)
xmlFileContent = xmlFileContent.Remove(0, index);
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlFileContent);
XmlNamespaceManager mgr = new XmlNamespaceManager(doc.NameTable);
mgr.AddNamespace("my", @"http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-06-10T00:13:44");
//the sample node to read
XmlNode nodeStatus = doc.DocumentElement.SelectSingleNode("/my:Eddys_Form/my:PlanHistory_Status", mgr);
string insertsomewhere = nodeStatus.InnerText.tostring();
For the insert into the csv there are plenty of samples in the internet. just pass the string above.
I hope this heps.