Create .DBF in C# code that is readable from Excel (VFP or not)
问题 LANGUAGE: C#, System: Windows7, Excel 2007 I want to create a .DBF from some data, and i want to open it from Excel 2007. It can be either dBase or foxpro. I am currently doing in FoxPro9 (btw this code is from the internet): OleDbConnection con = new OleDbConnection("Provider=VFPOLEDB.1;Data Source=C:\\Temp\\;"); con.Open(); OleDbCommand cmd1 = new OleDbCommand("Create Table TestDBF (Field1 I, Field2 C(10))", con); OleDbCommand cmd2 = new OleDbCommand("Insert Into TestDBF Values (1, 'Hello')