Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Glen Villar
  Where is Glen Villar?
 Cabanatuan
 Philippines
 Glen Villar
 To: vece walet
  Where is vece walet?
 tangerang
 Indonesia
 vece walet
 Tags
Subject: RE: error import xls
Thread ID: 230766 Message ID: 230770 # Views: 31 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Tuesday, June 09, 2009 3:50:31 AM         
   


> hi foxer
>
> ERROR ERROR and ERROR.
>
> why i wont to import data from excel to dbf, but not 'same'
> where error location
>
>
> SET DECIMALS TO 2
> IMPORT from 'c:\donlot\book1.xls' TYPE xl5
> 

>
> File Excel
>
>
>
> Create Table but data not same. xls.70.65------>70.650000001, cell decimal.2
>
>
>
>
> thx.
> www.yasmida.blogspot.com

Hi!

You can use SET FIXED ON to specify the number of decimals displayed. But the decimals are still there, you will only limit the number of decimals displayed e.g. when browsing. Putting the focus on the field will reveal its actual decimal size.

Set Fixed On
Import From Book1.xls Type XL5
Browse
Set Fixed Off


Or you can use a select statement from the resulting table after the import command is executed.

Import From Book1.xls Type XL5
SELECT CAST(a as n(12,2)) as a FROM book1 Into Cursor Imported
Browse Normal


(coffee)
My Blog Site:  Glenn Villar Blog



COMPLETE THREAD
error import xls Posted by vece walet @ 6/9/2009 3:22:21 AM
RE: error import xls Posted by Glen Villar @ 6/9/2009 3:50:31 AM
RE: error import xls Posted by vece walet @ 6/9/2009 3:59:51 AM
RE: error import xls Posted by Glen Villar @ 6/9/2009 4:15:36 AM
RE: error import xls Posted by vece walet @ 6/9/2009 4:31:57 AM
RE: error import xls Posted by Glen Villar @ 6/9/2009 4:37:07 AM