I was not able to import it using APPEND TYPE XLS.
I tried clearing the format and the freeze panes and saving it using Excel 2002 XP.
Main Topics
Browse All TopicsHi Expert
I am having problem importing Microsoft Excel 97-2003 worksheet. I am running VFP9 SP2. It stops working when try to import using import wizard.
If I open it first and save it as Excel 95 or as Text (tab delimited) then import it works fine .
Is there anyway I can convert Microsoft Excel 97-2003 worksheet to Text (Tab Delimited) file within Foxpro programme without opening it in Excel?
I am attaching an excel file that I have problem importing.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The fastest way to read excel files is by ADO. This code is given by Cetin Basoz
do excel2vfp with fullpath('fms1.xls'),.t.,.
* Foxite
* Thread 153776
* Author : Cetin Basoz
PROCEDURE EXCEL2VFP
LPARAMETERS lcDataSource,lFirstRowHasH
#Define adSchemaCatalogs 1
#Define adSchemaColumns 4
#Define adSchemaTables 20
Close Databases All
Local lcConStr
IF NOT ll2007
* Excel97-2003
lcConStr = ;
'Provider=Microsoft.Jet.OL
'Data Source='+m.lcDataSource+';
'Extended Properties="Excel 8.0;HDR='+;
IIF(m.lFirstRowHasHeader,'
IIF(m.lReturnAllAsText,'1'
else
* Excel2007
lcConStr = ;
'Provider=Microsoft.ACE.OL
'Data Source='+m.lcDataSource+';
'Extended Properties="Excel 12.0;HDR='+;
IIF(m.lFirstRowHasHeader,'
ENDIF
ReadSchema(m.lcConStr)
Select TableList
Scan
lcTableName = Trim(Table_name)
lcLocalCursor = Textmerge("Sheet<<PADL(RECNO
ADOQuery(m.lcConStr, Textmerge("select * from [<<m.lcTableName>>]"), m.lcLocalCursor)
Endscan
Procedure ADOQuery(tcConStr,tcQuery,
Local oConn As 'ADODB.Connection'
Local oRS As ADODB.RecordSet
oConn = Createobject('ADODB.Connec
oConn.Mode= 1 && adModeRead
oConn.Open( m.tcConStr )
oRS = oConn.Execute(m.tcQuery)
RS2Cursor(oRS,m.tcCursorNa
oRS.Close
oConn.Close
Endproc
Procedure ReadSchema(tcConStr)
Local oConn As 'ADODB.Connection'
Local rstSchema As ADODB.RecordSet
oConn = Createobject('ADODB.Connec
oConn.Mode = 1 && adModeRead
oConn.Open( m.tcConStr )
rstSchema = oConn.OpenSchema(adSchemaT
*rstSchema = oConn.OpenSchema(adSchemaC
RS2Cursor(rstSchema,'Table
rstSchema.Close
oConn.Close
Endproc
Procedure RS2Cursor(toRS, tcCursorName) && simple single cursor - not intended for complex ones
tcCursorName = Iif(Empty(m.tcCursorName),
Local xDOM As 'MSXML.DOMDocument'
xDOM = Createobject('MSXML.DOMDoc
toRS.Save(xDOM, 1)
Xmltocursor(xDOM.XML, m.tcCursorName)
Endproc
You will need 2007 Office System Driver: Data Connectivity Components at http://www.microsoft.com/d
Business Accounts
Answer for Membership
by: pcelbaPosted on 2009-10-21 at 03:57:56ID: 25622570
It seems your sheets were saved in Excel 2007 as Excel 97-2003 format and this is standard behavior observed not only in Visual FoxPro... You have to ask Microsoft to fix this problem.
Some work around exists:
1) You may open your Excel file in VFP via OLE automation and save it in Excel 95 format and then import.
2) You may even read it via OLE automation in VFP. This option is very slow, of course.