importing values from excel - Clipper

This is a discussion on importing values from excel - Clipper ; Hi, I am using: oExcel:=XLApplication{"Excel.Application"} to import a range of excel cells into a VO array but; in a column that I spect only strings and when the cell content is something like: 321358 or .656577 I receive a numeric ...

+ Reply to Thread
Results 1 to 2 of 2

importing values from excel

  1. Default importing values from excel

    Hi,
    I am using:
    oExcel:=XLApplication{"Excel.Application"}
    to import a range of excel cells into a VO array but;
    in a column that I spect only strings and when the cell content is
    something like:
    321358 or .656577 I receive a numeric value like 321358.00 or
    0.656577.
    What can I do in order to get the data spected (string) in the array?

    Thanks
    Oscar Hernandez


  2. Default Re: importing values from excel

    Oscar

    Here's one way:

    for nIndex := 1 upto alen( anArray )
    if isNumeric( anArray[ nIndex ] ) )
    anArray[ nIndex ] := ntrim( anArray[ nIndex ] )
    endif
    next

    Another way is to make sure the column in the excel spreadsheet is defined as a 'Character/Text/String' type.

    --
    CYA
    Steve



+ Reply to Thread

Similar Threads

  1. Importing from Excel
    By Application Development in forum ADO DAO RDO RDS
    Replies: 4
    Last Post: 12-14-2007, 09:11 AM
  2. Importing Excel spreadsheets
    By Application Development in forum ADO DAO RDO RDS
    Replies: 1
    Last Post: 11-30-2007, 12:23 PM
  3. Importing Excel SpreadSheet
    By Application Development in forum Adobe Indesign
    Replies: 1
    Last Post: 11-02-2007, 04:05 AM
  4. Importing Multiple XML Field values
    By Application Development in forum XML SOAP
    Replies: 2
    Last Post: 03-30-2006, 07:42 PM
  5. Importing Excel data
    By Application Development in forum Clarion
    Replies: 4
    Last Post: 08-01-2004, 04:41 PM