Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import Excel file problem
Message
From
16/12/2008 03:40:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
16/12/2008 01:37:39
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01367738
Message ID:
01367748
Views:
17
>Hi,
>When I import a excel worksheet(Sheet 2) to a cursor, I found that the date column change to " / / " in the cursor.
>the date format of the date column is "mm/dd/yy".
>Why ?
>
>
>vfile= 'R101208.XLS'
>oExcel = CreateObject("Excel.Application")
>oWorkbook = oExcel.Workbooks.Open(vFile)
>tSheets = oWorkbook.Sheets.Count             && get total of sheets
>
>DIMENSION nSheet(tSheets)
>FOR n=1 TO tSheets
>	nSheet(n) = oWorkbook.Sheets(n).Name      && get names of the sheets
>NEXT
>oExcel.Quit()		&& quits excel but don't unload it from memory.
>			&& I have Office 2003 and it didn't remove EXCEL.EXE from memory
>RELEASE oExcel		&& This remove Excel from memory
>
>CREATE CURSOR CUSFILE (CUSNO C(10), CUSNAME C(20), INVDATE D(8), DNNO C(10), AMOUNT N(10,2), RMK C(50))
>APPEND FROM (vFile) XL8 SHEET (nSheet(2))
>
>
>
>Please advise
>Derek

Hi Derek,
You may use the code from www.foxite.com/archives/0000153776.htm to get data from excel.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform