Opening a tab delimited file and replacing a space

Hi,
I am trying to open a tab delimited file with 4 columns and corresponding values under it. If no value under the column, 0 should be replaced. I used the StringTokenizer and the split methods, but this doesnt seem to work. Any ideas?
E.g
Title1 Title2 Title3
4 7
5 2
SHould be like this:
Title1 Title2 Title3
4 0 7
0 5 2
Thanks..

The answer, however, is no. Java is a strongly typed
language; there is no predefined manner in which a
String object can be casted to an Integer object
because a String is not an Integer.
However, if you'd like to create an Integer based on
the contents of a String, you can pass the String to
the Integer.parseInt(String) method. That method
will do one of two things: return the Integer object
representing the integer contained within the String
(if the String represents an Integer) or throw a
NumberFormatException (if the String is not an
Integer).Hi,
Thanks tvynr for your reply. Ok first things, sorry, I had written that post in a hurry. Yes i dont usually put capital letters for my fields. Also i did mean using the add method. Not the get..
And yes I have tried various different type castings. Just to see if one of them would work. And yes i did try Integer.parseInt() by passing in the string to get back its contents as an integer. *And yes the String content is an integer.
Heres a snippet of my code -
              List ArrScore1 = new ArrayList(); //List to store Score in one Array
              List ArrScore2 = new ArrayList(); //List to store same Scores in another Array. FOr comparisions
              List SCORES = new ArrayList();
              int dist1,dist2 = 0;
              float distance,percent;
                while ((record = br.readLine())!= null)     //To read from a file line by line from first line
                  recCount++;
                  String rec = record;
                  String [] ScoreScop = rec.split("\t");
                  ArrScore1.add(ScoreScop[4])); 
                  ArrScore2.add(ScoreScop[4]);
                } //End of While loop
             System.out.println("Total Records: " + recCount);
             for (int i=0; i<ArrScore1.size(); i++)
                for (int j = i + 1; j < ArrScore2.size(); j++)
                   dist1  = Integer.parseInt(ArrScore2.get(j));  //Error I get here is is Cannot resolve symbol. What does this mean exactly?
dist2 = Integer.parseInt(ArrScore1.get(i)); //Same error
distance = dist1/dist2;
percent = distance * 100;
SCORES.add(percent); //Again same error
} //End of j loop
} // End of i loop
I have included all the necessary packages as well. Including :
import java.io.*;
import java.util.*;
import java.lang.*;
import java.util.List;
import java.util.ArrayList;Any idea what I am doing wrong here?

Similar Messages

  • Opening a tab-delimited file in numbers

    Hello,
    I have a tab-delimited file with the extension .srt to open in Numbers. I can do this easily in Microsoft Excel by going to the Open menu. It then gives me the option to say how the file is delimited and then it opens it. I can't seem to do this in Numbers... When I get to the Open menu and try to open the file, it is grayed out, so unaccessible... how does one do this in Mac?
    Thanks

    As was explained here many times, Numbers may open csv files if :
    (1) the file name ends with ".csv"
    (2) values are separated by commas if the decimal char in use on the machine is the period
    values are separated by semi-colons if the decimal char in use on the machine is the comma.
    (3) we have no way to change the values separator.
    Yvan KOENIG (VALLAURIS, France) samedi 18 juin 2011 20:50:54
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Reading a tab delimited file and extracting a substring

    hi all,
    i have a text file which is tab delimited,which contains keys and values.like the first 3 lines are keys which are like 50 keys(1-50).The remaining lines contains values..so that when it is is opened in excel sheet each value gets mapped to its key.My problem is i have to extract a substring between the two keys from the text file...for eg. between
    (10-11)..does anyone know how to do it.if so please post it.
    thanks

    I'm not sure what your question is. The API docs for String.substring(int, int) are fairly straightforward. You will call String.indexOf(String) to find your delimiter. If you only want the portion after the delimiter, then call String.substring(posDelimiter + 1) and you are done. If you want the portion before the delimiter, then call String.substring(0, posDelimiter). If you want a portion between two delimiters, then call String.indexOf() again, and then call String.substring(startDelimiter + 1, endDelimiter);
         static final public void main(final String[] args) {
              String test = "Hello World=Java Program";
              // Portion before a delimiter (=)
              int posDelimiter = test.indexOf("=");
              System.out.println(test.substring(0, posDelimiter));
              // Portion after a delimiter (=)
              System.out.println(test.substring(posDelimiter + 1));
              // Portion between two delimiters (space)
              int posStart = test.indexOf(" ");
              int posFinish = test.indexOf(" ", posStart + 1);
              System.out.println(test.substring(posStart + 1, posFinish));
         }- Saish

  • How to upload a TAB Delimited file and pls tell me the internal tble format

    Hello All,
    When i upload a TAB Delimited .txt file its giving me # Symbols in between the internal table fields.
    pls advise.
    Suresh

    data: begin of wa_input,  
            plnnr(8) type c,   
            plnal(2) type c,   
            vornr(4) type c,   
            arbpl(8) type c,   
            steus(4) type c,   
            ltxa1(40) type c,  
            ltext(1000) type c,
           end of wa_input.    
    data: i_input like wa_input occurs 0 with header line.
      call function 'WS_UPLOAD'                  
           exporting                             
                filename            = p_input " file path
                filentype           = 'DAT'      
           tables                                
                data_tab            = i_input    
           exceptions                            
                file_open_error     = 1          
                file_write_error    = 2          
                invalid_filesize    = 3          
                invalid_table_width = 4          
                invalid_type        = 5          
                no_batch            = 6          
                unknown_error       = 7.

  • Read Tab delimited File from Application server

    Hi Experts,
    I am facing problem while reading file from Application server.
    File in Application server is stored as follows, The below file is a tab delimited file.
    ##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
    i have downloaded this file from Application server using Transaction CG3Y. the Downloaded file is a tab delimited file and i could not see "#' in the file,
    The code is as Below.
    c_split  TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab.
    here i am using IGNORING CONVERSION ERRORS in order to avoid Conversion Error Short Dump.
    OPEN DATASET wa_filename-file FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
          IF sy-subrc = 0.
            WRITE : /,'...Processing file - ', wa_filename-file.   
           DO.
          Read the contents of file
              READ DATASET wa_filename-file INTO wa_file-data.
              IF sy-subrc = 0.
                SPLIT wa_file-data AT c_split INTO wa_adrc_2-kunnr
                                                   wa_adrc_2-title
                                                   wa_adrc_2-name1
                                                   wa_adrc_2-name2
                                                   wa_adrc_2-name3
                                                   wa_adrc_2-name4
                                                   wa_adrc_2-name_co
                                                   wa_adrc_2-city1
                                                   wa_adrc_2-city2
                                                   wa_adrc_2-regiogroup
                                                   wa_adrc_2-post_code1
                                                   wa_adrc_2-post_code2
                                                   wa_adrc_2-po_box
                                                   wa_adrc_2-po_box_loc
                                                   wa_adrc_2-transpzone
                                                   wa_adrc_2-street
                                                   wa_adrc_2-house_num1
                                                   wa_adrc_2-house_num2
                                                   wa_adrc_2-str_suppl1
                                                   wa_adrc_2-str_suppl2
                                                   wa_adrc_2-country
                                                   wa_adrc_2-langu
                                                   wa_adrc_2-region
                                                   wa_adrc_2-sort1
                                                   wa_adrc_2-sort2
                                                   wa_adrc_2-deflt_comm
                                                   wa_adrc_2-tel_number
                                                   wa_adrc_2-tel_extens
                                                   wa_adrc_2-fax_number
                                                   wa_adrc_2-fax_extens
                                                   wa_adrc_2-taxjurcode.
    WA_FILE-DATA is having below values
    ##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
    And this is split by tab delimited and moved to other variables as shown above.
    Please guide me how to read the contents without "#' from the file.
    I have tried all possible ways and unable to get solution.
    Thanks,
    Shrikanth

    Hi ,
    In ECC 6 if all the unicode patches are applied then UTF 16 will defintly work..
    More over i would suggest you to ist replace # with some other  * or , and then try to see in debugging if any further  # appears..
    and no # appears then try to split now.
    if even now the # appears after replace statement then try to find out what exactly is it... wheather it is a horizantal tab etc....
    and then again try to replace it and then split..
    Please follow the process untill all the # are replaced...
    This should work for you..
    Let me know if you further face any issue...
    Regards
    Satish Boguda

  • To import addresses, need format of tab delimited file

    I am trying to import addresses from my G3 PB Mozilla App. I exported addresses on G3 to both ldif and tab-delimited files and then attached to an email message which I sent to myself. I received email on Mac mini, but the 2 files showed up inline, not as attachments. I copied the ldif portion to a text file; ditto for tab-delimited. I tried importing into Address Book, but got message that format was not valid.
    Can't I just edit the tab-delimited file in TextEdit, save as RTF, and get Address Book to recognize the data?
    Thanks,
    Owen

    Hi, Did you get solution for this? Please let me know as I'm looking for the same solution. The Bank requirement is to generate a Tab delimited file but the RFFOGB_T with Format GB_BACS issues the output as below...
    Required by Bank:
    692532 73855963 RRS P R BACKLEY         169.91 GSLV
    294518 99855581 CETS PRITECTIIN         799.72 GSLV
    The output I get from SAP/DMEE:
    ........1........2........3........4........5........6....
    VOL1000004                           ....953312
                  1 <CR/LF>
    HDR1A953312S  195331200000400010001       10040 100420000000
                    <CR/LF>
    HDR2F0200000100                                   00
                    <CR/LF>
    UHL1 10041999999    000000001 DAILY  000
                    <CR/LF>
    6010392865540009960062063474662    00000115000ABC UK Ltd.       0
    1465                                <CR/LF>
    6006206347466201760062063474662    00000115000SAPBACS0000003306 C
    ONTRA            ABC UK LTD.        <CR/LF>
    EOF1A953312S  195331200000400010001       10040 100420000000
                    <CR/LF>
    EOF2F0200000100                                   00
                    <CR/LF>
    UTL10000000115000000000011500000000010000001
                    <CR/LF>
    END
                    <CR/LF>
    <END>
    Rgds,
    Stan

  • Tab delimited file as target

    I am using OWB to read data from a bunch of oracle tables and putting the results in a flat file. I've defined is as a tab delimited file and everything works fine except for one thing. What I need is to include double quotes for only those fields that are of character type. Currently, all the fields are being enclosed with double quotes. Where can I specify double quotes as enclosures for character fields only? Any feedback would be greatly appreciated.
    Thanks.

    the best option that i would suggest is:
    create a staging table with columns datatype as varchar2 or have one single large column with carchar2(4000)
    put all values from the source table to the staging table by concatenating all the columns
    have a logic to add " " to the required fields, this can be easily done using expression builder by concatenating the "" before and end of the string
    export the table as tab delimited so at the end of it you will ahve the required fields enclosed by strings.

  • Why my Firefox v6.02 browser always open *.csv (comma delimited) file in another tab rather than downloading a file? I do not have right click option to save this file.

    My Firefox v6.02 browser always open *.csv (comma delimited) file in another tab rather than downloading a file? I do not have right click option to save this file. My OP is windows XP sp2.

    Hi mha007,
    Go to this site "http://www.nseindia.com/content/indices/ind_histvalues.htm"
    Select any Index type and from dates select just one day or any number of days. Click "Get Details" button. This will open tabular data on loaded page (with link CSV file link at bottom).
    When I click this link, it opens CSV file in new tab (in Firefox browser) and does not open download window (just as in case of other file formats like *.zip, *.rar or *.xls).
    Right-click of link does not give "save as" or "save file" option.
    Firefox is my preferred and default browser.
    ========
    surprisingly, When I do same thing in IE6 browser, data-table page shows 2 options below table, i.e. (1) download file (2) open file.

  • Upload tab-delimited file from the application server to an internal table

    Hello SAPients.
    I'm using OPEN DATASET..., READ DATASET..., CLOSE DATASET to upload a file from the application server (SunOS). I'm working with SAP 4.6C. I'm trying to upload a tab-delimited file to an internal table but when I try load it the fields are not correctly separated, in fact, they are all misplaced and the table shows '#' where supposedly there was a tab.
    I tried to SPLIT the line using as separator a variable with reference to CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB but for some reason that class doesn't exist in my system.
    Do you know what I'm doing wrong? or Do you know a better method to upload a tab-delimited file into an internal table?
    Thank you in advance for your help.

    Try:
    REPORT ztest MESSAGE-ID 00.
    PARAMETER: p_file LIKE rlgrap-filename   OBLIGATORY.
    DATA: BEGIN OF data_tab OCCURS 0,
          data(4096),
          END   OF data_tab.
    DATA: BEGIN OF vendor_file_x OCCURS 0.
    * LFA1 Data
    DATA: mandt  LIKE bgr00-mandt,
          lifnr  LIKE blf00-lifnr,
          anred  LIKE blfa1-anred,
          bahns  LIKE blfa1-bahns,
          bbbnr  LIKE blfa1-bbbnr,
          bbsnr  LIKE blfa1-bbsnr,
          begru  LIKE blfa1-begru,
          brsch  LIKE blfa1-brsch,
          bubkz  LIKE blfa1-bubkz,
          datlt  LIKE blfa1-datlt,
          dtams  LIKE blfa1-dtams,
          dtaws  LIKE blfa1-dtaws,
          erdat  LIKE  lfa1-erdat,
          ernam  LIKE  lfa1-ernam,
          esrnr  LIKE blfa1-esrnr,
          konzs  LIKE blfa1-konzs,
          ktokk  LIKE  lfa1-ktokk,
          kunnr  LIKE blfa1-kunnr,
          land1  LIKE blfa1-land1,
          lnrza  LIKE blfa1-lnrza,
          loevm  LIKE blfa1-loevm,
          name1  LIKE blfa1-name1,
          name2  LIKE blfa1-name2,
          name3  LIKE blfa1-name3,
          name4  LIKE blfa1-name4,
          ort01  LIKE blfa1-ort01,
          ort02  LIKE blfa1-ort02,
          pfach  LIKE blfa1-pfach,
          pstl2  LIKE blfa1-pstl2,
          pstlz  LIKE blfa1-pstlz,
          regio  LIKE blfa1-regio,
          sortl  LIKE blfa1-sortl,
          sperr  LIKE blfa1-sperr,
          sperm  LIKE blfa1-sperm,
          spras  LIKE blfa1-spras,
          stcd1  LIKE blfa1-stcd1,
          stcd2  LIKE blfa1-stcd2,
          stkza  LIKE blfa1-stkza,
          stkzu  LIKE blfa1-stkzu,
          stras  LIKE blfa1-stras,
          telbx  LIKE blfa1-telbx,
          telf1  LIKE blfa1-telf1,
          telf2  LIKE blfa1-telf2,
          telfx  LIKE blfa1-telfx,
          teltx  LIKE blfa1-teltx,
          telx1  LIKE blfa1-telx1,
          xcpdk  LIKE  lfa1-xcpdk,
          xzemp  LIKE blfa1-xzemp,
          vbund  LIKE blfa1-vbund,
          fiskn  LIKE blfa1-fiskn,
          stceg  LIKE blfa1-stceg,
          stkzn  LIKE blfa1-stkzn,
          sperq  LIKE blfa1-sperq,
          adrnr  LIKE  lfa1-adrnr,
          mcod1  LIKE  lfa1-mcod1,
          mcod2  LIKE  lfa1-mcod2,
          mcod3  LIKE  lfa1-mcod3,
          gbort  LIKE blfa1-gbort,
          gbdat  LIKE blfa1-gbdat,
          sexkz  LIKE blfa1-sexkz,
          kraus  LIKE blfa1-kraus,
          revdb  LIKE blfa1-revdb,
          qssys  LIKE blfa1-qssys,
          ktock  LIKE blfa1-ktock,
          pfort  LIKE blfa1-pfort,
          werks  LIKE blfa1-werks,
          ltsna  LIKE blfa1-ltsna,
          werkr  LIKE blfa1-werkr,
          plkal  LIKE  lfa1-plkal,
          duefl  LIKE  lfa1-duefl,
          txjcd  LIKE blfa1-txjcd,
          sperz  LIKE  lfa1-sperz,
          scacd  LIKE blfa1-scacd,
          sfrgr  LIKE blfa1-sfrgr,
          lzone  LIKE blfa1-lzone,
          xlfza  LIKE  lfa1-xlfza,
          dlgrp  LIKE blfa1-dlgrp,
          fityp  LIKE blfa1-fityp,
          stcdt  LIKE blfa1-stcdt,
          regss  LIKE blfa1-regss,
          actss  LIKE blfa1-actss,
          stcd3  LIKE blfa1-stcd3,
          stcd4  LIKE blfa1-stcd4,
          ipisp  LIKE blfa1-ipisp,
          taxbs  LIKE blfa1-taxbs,
          profs  LIKE blfa1-profs,
          stgdl  LIKE blfa1-stgdl,
          emnfr  LIKE blfa1-emnfr,
          lfurl  LIKE blfa1-lfurl,
          j_1kfrepre  LIKE blfa1-j_1kfrepre,
          j_1kftbus   LIKE blfa1-j_1kftbus,
          j_1kftind   LIKE blfa1-j_1kftind,
          confs  LIKE  lfa1-confs,
          updat  LIKE  lfa1-updat,
          uptim  LIKE  lfa1-uptim,
          nodel  LIKE blfa1-nodel.
    DATA: END   OF vendor_file_x.
    FIELD-SYMBOLS:  <field>,
                    <field_1>.
    DATA: delim          TYPE x        VALUE '09'.
    DATA: fld_chk(4096),
          last_char,
          quote_1     TYPE i,
          quote_2     TYPE i,
          fld_lth     TYPE i,
          columns     TYPE i,
          field_end   TYPE i,
          outp_rec    TYPE i,
          extras(3)   TYPE c        VALUE '.,"',
          mixed_no(14) TYPE c        VALUE '1234567890-.,"'.
    OPEN DATASET p_file FOR INPUT.
    DO.
      READ DATASET p_file INTO data_tab-data.
      IF sy-subrc = 0.
        APPEND data_tab.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    * count columns in output structure
    DO.
      ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      columns = sy-index.
    ENDDO.
    * Assign elements of input file to internal table
    CLEAR vendor_file_x.
    IF columns > 0.
      LOOP AT data_tab.
        DO columns TIMES.
          ASSIGN space TO <field>.
          ASSIGN space TO <field_1>.
          ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
          SEARCH data_tab-data FOR delim.
          IF sy-fdpos > 0.
            field_end = sy-fdpos + 1.
            ASSIGN data_tab-data(sy-fdpos) TO <field_1>.
    * Check that numeric fields don't contain any embedded " or ,
            IF <field_1> CO mixed_no AND
               <field_1> CA extras.
              TRANSLATE <field_1> USING '" , '.
              CONDENSE <field_1> NO-GAPS.
            ENDIF.
    * If first and last characters are '"', remove both.
            fld_chk = <field_1>.
            IF NOT fld_chk IS INITIAL.
              fld_lth = strlen( fld_chk ) - 1.
              MOVE fld_chk+fld_lth(1) TO last_char.
              IF fld_chk(1) = '"' AND
                 last_char = '"'.
                MOVE space TO fld_chk+fld_lth(1).
                SHIFT fld_chk.
                MOVE fld_chk TO <field_1>.
              ENDIF.       " for if fld_chk(1)=" & last_char="
            ENDIF.         " for if not fld_chk is initial
    * Replace "" with "
            DO.
              IF fld_chk CS '""'.
                quote_1 = sy-fdpos.
                quote_2 = sy-fdpos + 1.
                MOVE fld_chk+quote_2 TO fld_chk+quote_1.
              ELSE.
                MOVE fld_chk TO <field_1>.
                EXIT.
              ENDIF.
            ENDDO.
            <field> = <field_1>.
          ELSE.
            field_end = 1.
          ENDIF.
          SHIFT data_tab-data LEFT BY field_end PLACES.
        ENDDO.
        APPEND vendor_file_x.
        CLEAR vendor_file_x.
      ENDLOOP.
    ENDIF.
    CLEAR   data_tab.
    REFRESH data_tab.
    FREE    data_tab.
    Rob

  • How can I save a Numbers spreadsheet as a tab delimited file?

    Okay, I would like to save a Numbers spreadsheet as a tab delimited file. But of course I can't do that, since Numbers only saves as a comma separated values file.
    Plan B: I can open up a CSV file created by Numbers in TextEdit, and I would like to Find and Replace all the commas with tabs. So I open up the Find window, enter a comma under Find, but of course when I put the cursor in the Replace blank and hit the Tab key, it just goes to the next blank instead of giving me a Tab.
    Is there a way I can get a Tab into that blank so I can replace all the commas with tabs?
    --Dave

    Hello
    When we use TextEdit as I described, rows are separated by Returns.
    It appears that your program requires LineFeeds.
    Here is a neat soluce.
    Save this script as an Application Bundle.
    --\[SCRIPT tsv2csv]
    (* copy to the clipboard a block of datas separated by tabs
    run the script
    You will get on the desktop a csv file named from the current date-time.
    The values separator is set to match the Bento's requirements:
    If the decimal separator is period, the script uses commas.
    If the decimal separator is comma, the script uses semi-colons.
    This may be changed thru the setting of the property maybeSemiColon.
    According to the property needLF,
    embedded Returns will be replaced by LineFeeds
    or
    embedded LineFeeds will be replaced by Returns
    Yvan KOENIG (Vallauris, FRANCE)
    le 10 octobre 2008
    property needLF : true
    (* true = replace Returns by LineFeeds
    false = replace LineFeeds by Returns *)
    property maybeSemicolon : true
    (* true = use semiColons if decimal separator is comma
    false = always uses commas *)
    --=====
    try
    set |données| to the clipboard as text
    on error
    error "the clipboard doesn't contain text datas !"
    end try
    set line_feed to ASCII character 10
    if |données| contains tab then
    if maybeSemicolon then
    if character 2 of (0.5 as text) is "," then
    set |données| to my remplace(|données|, tab, quote & ";" & quote)
    else
    set |données| to my remplace(|données|, tab, quote & "," & quote)
    end if -- character 2 of (0.5…
    else
    set |données| to my remplace(|données|, tab, quote & "," & quote)
    end if -- maybeSemiColon
    end if -- |données| contains tab
    if needLF then
    if |données| contains return then set |données| to my remplace(|données|, return, line_feed)
    set |données| to my remplace(|données|, line_feed, quote & line_feed & quote)
    else
    if |données| contains line_feed then set |données| to my remplace(|données|, line_feed, return)
    |données| to my remplace(|données|, return, quote & return & quote)
    end if -- needLF
    set |données| to quote & |données| & quote
    set p2d to path to desktop as text
    set nom to my remplace(((current date) as text) & ".csv", ":", "-") (* unique name *)
    tell application "System Events" to make new file at end of folder p2d with properties {name:nom}
    write |données| to file (p2d & nom)
    --=====
    on remplace(t, tid1, tid2)
    local l
    set AppleScript's text item delimiters to tid1
    set l to text items of t
    set AppleScript's text item delimiters to tid2
    set t to l as text
    set AppleScript's text item delimiters to ""
    return t
    end remplace
    --=====
    --[/SCRIPT]
    Yvan KOENIG (from FRANCE vendredi 10 octobre 2008 13:47:36)

  • Handling tab delimited files.

    How do I import an Exel tab delimited(.xls) file into Numbers09?

    jaendre wrote:
    I read and understand English very well. I have followed your instructions and still do not get the results I want. Again, this is a tab delimited file that I am trying to import. I changed extension per your first response to .txt. double clicking only brings up text editor with more characters than I want to see.
    You wrote :
    How do I import an Exel tab delimited(.xls) file into Numbers09?
    This is why I urged you to replace the .xls extension which is not the correct one for a Tab Separated Values document.
    I described also the behavior of CSV files because some users don't make the difference betwee TSV and CSV.
    The described behavior was not matching Double clicking the file icon and opening with Numbers09, gives me all the info entire file in one cell with all the delimiting symbols. Changing file extension to .csv produces same results. Dragging and dropping the file on a blank Numbers page and opening an existing file through Numbers09 gives identical results.
    Your explanation of CSV delimiting was very enlightening, but I need some direction on how to tell Numbers what the delimiting character should be.
    If you document isn't a tsv or a csv one you are the only one able to know what it is.
    I repeat : send the document to my mailbox.
    At this time everybody is wasting time more or less precious.
    "Everybody" means :
    you, the Original Poster
    Barry which must work to earn its life so I guess that time available to help is limited
    me because I'm old and in such a case, every minute is a precious one.
    Yvan KOENIG (VALLAURIS, France) mardi 25 janvier 2011 21:51:31

  • Display tab delimited file on a VI table

    Hi All,
    I have a tab delimited file that I want to display using the Table Control.
    I tried using tab and /n parameters in a while loop to search the file and display on the table.
    However this won't work as the file is of varying size, i.e. some rows only have one column will others have 2.
    Is their a simple VI for importing tab  delimited files that anyone knows of?
    Thanks,
    Sean
    Solved!
    Go to Solution.

    Edit: I should have mentioned.
    The file is encoded so must decoded.  I then have a string so I can't use the open spreadsheet open, rather I need to display the string in a table.
    S

  • Split tab delimited file coming from application server.

    Hi,
    i have received a tab delimited file from the application server.it contains # instead of tab at the application server.
    i want to know how to split it.
    i tried decalring constant as:
    c_tab type x value'09'.
    but it gives an error saying only c,n,d and t types are allowed.
    please gelp.
    Thanks,
    Anand.

    Hi,
    Do like this
    *--Local Variables
      DATA : l_file TYPE string,
             l_line TYPE string.
    *--Clear
      CLEAR : l_file.
      l_file = p_ipfile.
    *--Read the data from application server file.
      OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
    *--Error in opening file
        MESSAGE i368(00) WITH text-005.
      ENDIF.
    *--Get all the records from the specified location.
      DO.
        READ DATASET l_file INTO l_line.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab
                          INTO st_ipfile-vbeln
                               st_ipfile-posnr
                               st_ipfile-edatu
                               st_ipfile-wmeng.
          APPEND st_ipfile TO it_ipfile.
        ENDIF.
      ENDDO.
    *--Close dataset
      CLOSE DATASET l_file.
    Regards,
    Prashant

  • Trouble importing contacts from a tab-delimited file into Contacts on 10.9.5

    I am having Trouble importing contacts from a tab-delimited file into Contacts on MacBook Pro, OS 10.9.5, Intel 2.4 GHz Core 2 Duo., 400GB drive, 4GB memory DDR3
    So far I have:
    - Followed closely the help screen in Contacts app
    - Modified my source document meticulously - first in MS Word, then copied and tweaked in Apple's "Text Edit" app
    - The problem arises when I go to access the document for import.  Specifically, the target document, and all others in that file, are "greyed out" and thus can't be "opened" to facilitate the import process
    - Tried changing the extension of the document name to ".txt", ".rtf", and ".rtd". No change or improvement.
    - Searched Apple.com/help and found nothing relevant
    Can anyone offer some advice or tell me what I may be overlooking in this process?
    Any help will be greatly appreciated!
    Thanks,
    <Email Edited By Host>

    Hi Rammohan,
    Thanks for the effort!
    But I don't need to use GUI upload because my functionality does not require to fetch data from presentation server.
    Moreover, the split command advised by you contains separate fields...f1, f2, f3... and I cannot use it because I have 164 fields.  I will have to split into 164 fields and assign the values back to 164 fields in the work area/header line.
    Moreover I have about 10 such work areas.  so the effort would be ten times the above effort! I want to avoid this! Please help!
    I would be very grateful if you could provide an alternative solution.
    Thanks once again,
    Best Regards,
    Vinod.V

  • Feature request : import of multi-line notes in CSV or tab-delimited file

    This is a feature request to the AddressBook development team:
    Following a question posted here and asked to support (thanks to Barry and Julia from ADC), it turns out that AddressBook is not ready yet to import multi-line notes from a CSV or tab-delimited file.
    I would like to kindly suggest the AddressBook development team to update the import methods for such flat files to parse the text of what is assigned to the Notes field, and convert documented escape sequences to their pre-determined corresponding special character.
    I would think that the following would be pretty easy to implement, and easy for the targeted audience (enthousiasts power-users and up) to remember:
    "\n " : mark a new line (same as ^p in Word)
    "\t " : replace by a tab
    I would keep the trailing space to avoid problems with DOS-type file path problems.
    and of course...
    "\\n " and "\\t " for whoever would want to import notes about \n and \t
    For example, in a Notes column, the text:
    "Escape sequence \\n :\n move the text to a new line\n \n while escape sequence \\t :\t move the text to the next horizontal tab"
    would give the following (just consider text between <Note> marks):
    <Note>
    Escape sequence \n:
    move the text to a new line
    while escape sequence \t: move the text to the next horizontal tab
    </Note>
    Thanks for reading...
    Frédéric Denis

    The developers do not necessarily read these USER discussion pages. If you want to make suggestions and know they will be read (which is at least a step towards implementation) use the OS X feedback page.
    AK

Maybe you are looking for

  • Cairo-dock being spawned multiple times when clicking 'home' icon?

    Hi all, Not sure if any other cairo-dock users experience this, sometimes another instance of cairo-dock will launch seemingly out of nowhere. I've seen this for a couple of weeks but never been able to correlate it with any particular thing I've bee

  • Exporting for iDVD

    I have tried using "Export to Quicktime" as suggested in a recent posting, but the file is very small and when viewing the resulting file on my Mac, it looks inferior in quality. Is this really the best way? I know that there are many options in "Qui

  • Wave Dissolve/Dream Sequence Transition

    Hello all! I desperately need to find a wave dissolve transition (as seen in Wayne's World...the cheesy wavy 'dream sequence/flashback' transition) for iMovie. I've seen one for Final Cut and Virtix (now defunct) has one for older versions of iMovie.

  • InfoCube Dimensions

    Hello SDN'ers, I have query on cube dimensions. I have a cube where 13 dimensions excluding the predefined have been in use. I have checked the relevant cube under the program SAP_INFOCUBE_DESIGNS or transaction RSRV to find how the dimensions are ma

  • Import Movies from Hi8 using USB

    Is there any way to import movies from a video Hi* camera using a USB cable? The camera does not have a firewire connection.