Hello Heather,
     I strongly suspect that the word "integer" was unintentionally misused.  
In any case, to input Excel data into a basic program, first "SAVE AS" the 
Excel file as a tab or comma delimited text file (FILENAME.TXE).  Then use a 
variation on the Basic code:

OPEN "FILENAME.TXT" FOR INPUT AS #1
FOR i = 1 TO whatever '(the number of rows of data)
  INPUT #1, datum1, datum2, datum3 '(however many are needed)
NEXT i
CLOSE #1

     If any text (STRING$) information exists in the Excel file, it must either 
be removed, or the Basic code must be written so as to accomodate it.  I 
usually just input it into a string variable and waste it, or maybe print it to 
the monitor so the user will be aware it was in there.
     It is very easy to get into trouble inputing multiple-column data files 
into Basic.  For example, missing values  will cause the data to be inputed out 
of order unless some protection is built into the code.  Be very careful that 
what you get is what you expect.

Take care, Tom

---- Original message ----
>Date: Thu, 1 Jun 2006 09:26:35 -0400
>From: Michael Fuller <[EMAIL PROTECTED]>  
>Subject: Re: Modeling in integers: exporting from excel to BASIC  
>To: [email protected]
>
>Heather,
>Could you please provide more information on why you need to convert  
>your data to integers? If you need integer data because you are using  
>an older dialect of BASIC, have you considered using one of the newer  
>dialects that have a floating point data type? Otherwise there are  
>several ways to transform or reformat large (> 10Mb) data sets using  
>standard UNIX utilities.
>
>Mike
>_______________________________
>Michael M Fuller, Ph.D.
>The Institute for Environmental Modeling
>University of Tennessee
>Knoxville, TN 37996-1610
>EMAIL: mmfuller<at>tiem.utk.edu
>WEB: www.tiem.utk.edu/~mmfuller
>
>On Jun 1, 2006, at 12:00 AM, Heather Hawk wrote:
>> I have a laaaaarge set of data that I've been working with using  
>> various
>> stat programs that import ASCII values from excel spreadsheets,  
>> like PC-ORD
>> and JMP, but I'm trying to write a program for modeling in programs  
>> that
>> only accept values in integer form, like BASIC.  Does anyone know a
>> relatively straightforward way of exporting or converting excel  
>> spreadsheets
>> to be used in BASIC modeling?  Any advice on this will be tremendously
>> helpful, as re-punching the data is out of the question!  Thanks.
>> Heather Hawk
>> [EMAIL PROTECTED]

Reply via email to