Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel object
Message
From
04/12/2001 05:34:34
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
 
 
To
04/12/2001 04:43:23
Philip Jones
Cornwall County Council
Truro, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00589106
Message ID:
00589114
Views:
27
Hi,
In normal, it should be fine to capture Date format from Excel.
What's the cells' format of the date column?
And how you import it in VFP? append from test.xls type xl5.
To import it by manualy, you can:
oExcel=Createobject("EXCEL.APPLICATION")
oBook=oExcel.workbooks.open("file name with full path")
oSheet=oBook.worksheets(1)
** reading cell info. one by one
....
xValue=oSheet.cells(row,col).value
....
oBook.close && must be closed
Release oExcel

Also, look at UT download to see if there are any Excel import library.
:) Wilfred

>I need to import from excel files with a column of dates stored in dd/mm/yyyy format. Unfortunately the first row of cells in each file holds the heading for the columns. If I remove the heading cells from my test spreadsheet it imports fine. If they're left in the date column is imported to a 9 character string field and I loose the last digit of each date.
>
>I think I need to create an excel object and then somehow read in values from the the header cells before deleting them so that dates will import properly.
>
>I'm new to all this though and I'm stuck again. Any help would be greatly appreciated.
>
>Phil.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform