This seems to work now, thanks.
Int(Val(Hip_No)) as Hip_No, ;
oexcel.activesheet.range("J2:J" +
ltrim(str(ntotalrow))).NumberFormat = "0"
James E Harvey
Hanover Shoe Farms, Inc.
M.I.S./Corresponding Officer
Off: 717-637-8931
fax: 717-637-6766
email: [email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Dave Crozier
Sent: Wednesday, September 01, 2010 10:43 AM
To: 'ProFox Email List'
Subject: RE: excel automation
James,
Unless I am being stupid then on the assumption that the HIP_No field is
character VFP data with leading zero's and trailing decimals in the form
"00009.4023" then make the select statement for the HIP_No field like the
following:
Select all
Int(Val(Hip_No)) as Hip_No
>From ...
The field will then be transferred as a numeric field into Excel.
If you need to round it then just add the round() function into the select
statement as this will simply take the integer part of the character field.
Just be careful of any null field values you have.
Somehow I think that it isn't exactly what you want to do but.... holla if
it is different.
Dave C
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/09fb01cb4a11$24a2f570$6de8e0...@com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.