![odbc excel column type odbc excel column type](https://docs.dremio.com/images/excel-import.png)
Once you have the CSV file of the Excel data, then in VFP just create a data table/cursor to receive the data and do an APPEND FROM MyDataFile.csv DELIMITED and work with your data as needed.
ODBC EXCEL COLUMN TYPE CODE
Then when Done, stop recording and examine/Edit the Macro to see what Automation code will be needed. NOTE - if you want to try this, first do everything in Excel 2010 manually while recording a Macro. If so, you could continue with the above Excel Automation by saving the Excel data into a CSV file. Yes it will still work.īut you are correct, the SaveAs DBF no longer exists, however the SaveAs CSV does exist (apparently it is: FileExtStr = ".csv": FileFormatNum = 6). "make the first row after the column headers a value of 'x'") but this time do it with VFP Automation of Excel. You could do what you were previously doing manually (i.e. "Previously I would just manually make the first row after the column headers a value of 'x' and then highlight my selection and choose save as dbf" One of the benefits of VFP is that there are often a whole variety of equally acceptable methods to accomplish a task involving data manipulation. RE: Determine Field types when using SQLSTRINGCONNECT and Excel JRB-Bldr (Programmer) 6 Jan 11 23:23 I haven't tried the cursoradapter approch yet. I tried opening the excel file via automation and changing all cell types to text before running this code above, but then I loose the date formatting of dates and it just returns the numeric excel dates. I am trying to make something general that will just bring in the excel data as is, and since the structures vary I can't rely on knowing the field names ahead of time. ?, IIF( lnSuccess > 0, 'Good!', 'Failed' ) LnSuccess = SQLEXEC( lnSQLHand, lcSQLCmd, ) Here's the snippet of code I culled from the microsoft website and have been trying to alter: Bringing them over as text would preserve the precision (or rather significant figures) of the concentrations. A value of 2.60 is different for my purposes than a value of 2.6. The reason I use character fields instead of just numeric is for analytical precision. Now that I've been upgraded to Office 2010, that doesn't work anymore so I figured I would write a Fox procedure that effectively did the same thing, only perhaps a little slicker. Everything (sampling dates, numbers, chemical names) would save over as a character field. Previously I would just manually make the first row after the column headers a value of 'x' and then highlight my selection and choose save as dbf from the excel menus and then open my files in FoxPro and work with them as happy as can be. My data sets come to me in a variety of different excel formats. I'm dealing with environmental chemistry data. I'll explain my needs a little more (this might be a little long winded, sorry).