Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import from Excel
Message
From
17/02/2014 13:21:59
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
16/02/2014 02:38:44
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01594444
Message ID:
01594505
Views:
47
Jerry,

basically:
loExcel = createobject("Excel.Application")
loExcel.Workbooks.OPEN(getfile('XLSX'))
 laData     = loExcel.ActiveSheet.RANGE(loExcel.ActiveSheet.Cells(1,1),loExcel.ActiveSheet.Cells(100,100)).VALUE
now you have an array.

Errorhandling and specials excluded. :)

Basic trick is to try the stuff via excel macro and transform into VFP. One can read cell by cell, but it's sloooow.

Lutz


>I import Excel file to dbf using:
>
>
>APPEND FROM myexcel.xls TYPE xls
>
>
>but it only works with old version of Excel (Office XP), doesn't work with new Excel file.
>
>do I need to install any tools?
>
>please advise
>
>thanks
>
>Jerry
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform