Regarding Importing Text file

Hi All,
I want to import the Text file which contains the " tab" as Deliminator.
I am not able to import this file as I can not put " Tab" in check box provided on Import manager screen while importing the file.
Kindly advise on the same.
Regards
Rahul Kulkarni

Hi Rahul,
As far as my understanding.
While importing a .txt file we can specify one of the delimiter among (,  |  ;  )which can be entered by the keyboard.
As for Tab as a delimiter it will not allow you to enter Tab in your import manager Delimiter field.As Tab has a different functionality when it is working with the import manager window,it will move the cursor to the next field whn you press Tab instead of specifying it as a delimiter as this Tab key is working acc to the Windows functionlaity.
Unlike  Importing when we are syndicating our master data we can specify TAB as a delimiter along with it we can also specify (,  ;  |  custom ) etc.
Hope it helped
Thanks & Regards
Simona

Similar Messages

  • Importing text file into search and redact window.

    I am in the search window under the search and redact tool.  I
    am trying to import a file that was originally an excel to populate the
    search multiple words window.  I read that text files can be imported.  I saved the file as a text file but it does not import.  I can import an adobe file but this gives me a list with a bunch of junk.  What am I missing?

    The dialog imports text files.
    Make sure that the file you are importing is a text file and has one word in every line.

  • Importing text file (with file names) into Automator.. is it possible?

    Hello all,
    I have been working with Windows Batch files for my line of work. I have a couple of file names in a text file (a column), which I want to copy from one folder of one hdd to another folder on a different hdd. I have been trying to do this kind of work with a Mac. I already know how you copy and rename files in automator (which isn't difficult, of course) but you have to 'select' the files in the finder first (with get specified items).
    But the only way i see that you can specify items is by selecting them... is there a way to import a text file with all the file names instead of selecting all the file names manually?
    or is there an AppleScript alternative which I can use to import the text file (or just copy into applescript) and run before the query's of copying and renaming the files? I am kind of new to Apple programming.
    The text file looks like this:
    image1.jpg
    image2.jpg
    etc..
    so there has to be a command to: 'goto' a specific folder as well.
    Thanks in advance!

    You can import text files, but if they are just names you will need an additional action to add the source folder path. A *Run AppleScript* action can be used, for example:
    Tested workflow:
    1) *Ask for Finder Items* {Type: files } -- choose the text file containing the names
    2) *Combine Text Files* -- this gets the text file contents
    3) *Filter Paragraphs* { return paragraphs that are not empty } -- skip blank lines
    4) *Run AppleScript* -- copy and paste the following script:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 680; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- add folder path
    add the specified folder path to a list of file names
    input: a list of text items (the file names)
    output: a list of file paths (aliases)
    set output to {}
    set SkippedItems to {} -- this will be a list of skipped items (errors)
    set SourceFolder to (choose folder with prompt "Choose the folder containing the file names") as text -- this is the folder containing the names
    repeat with AnItem in the input -- step through each name in the input
    try
    set AnItem to SourceFolder & AnItem -- add the prefix
    set the end of the output to (AnItem as alias) -- test
    on error number ErrorNumber -- oops
    set ErrorNumber to ("  (" & ErrorNumber as text) & ")" -- add the specific error number
    set the end of SkippedItems to (AnItem as text) & ErrorNumber
    end try
    end repeat
    ShowSkippedAlert for SkippedItems
    return the output -- pass the result(s) to the next action
    end run
    to ShowSkippedAlert for SkippedItems
    show an alert dialog for any items skipped, with the option to cancel the workflow
    parameters - SkippedItems [list]: the items skipped
    returns nothing
    if SkippedItems is not {} then
    set {AlertText, TheCount} to {"Error with AppleScript action", count SkippedItems}
    if TheCount is greater than 1 then
    set theMessage to (TheCount as text) & space & " items were skipped:"
    else
    set theMessage to "1 " & " item was skipped:"
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SkippedItems, AppleScript's text item delimiters} to {SkippedItems as text, TempTID}
    if button returned of (display alert AlertText message (theMessage & return & SkippedItems) ¬
    alternate button "Cancel" default button "OK") is "Cancel" then error number -128
    end if
    return
    end ShowSkippedAlert
    </pre>
    5) *Copy Finder Items* { To: _your external drive_ }

  • Import Text Files Into Apple Notes?

    Hello,
    Is there a way for me to automate importing text files into Apple Notes? I can certainly do this manually via copy/paste, but have over 700 files to transfer.
    Peace,
    Dr. Z.

    Automator is Apple's simple way to do tasks like this, but Notes app doesn't have any actions for this so I assume you need to use Applescript to do this. Double check Automator  - I am on 10.9 & maybe 10.10 added support for Notes in Automator? Enter 'Note' in the search field to see if Automator can make new Notes.
    There is an example for making notes at…
    http://www.macosxautomation.com/applescript/notes/04.html
    See the "Create New Stylized Note" script <- click script icon to download it, copy & paste seems to fail because of how the browser displays characters.
    You would need to adapt that script to import from the text files.
    I'm not sure you really want to do that anyway - Notes app has such poor support that putting serious data into it looks like a mistake - how difficult will it be to export data when Apple eventually abandon it? It seems like a toy app to me for new iPhone users, it;s unclear if it will ever be able to compete with other options. There are third party apps to export from Notes.app, but why rely on third parties? A notes app should allow you to import & export your data!
    Notational Velocity seems like a better choice…
    http://notational.net/
    It will handle notes as text files if you desire, so you can store them in Dropbox if you want. You can also set it to sync to Simplenote on iOS.
    http://simplenote.com/
    If you need images within notes or text styling you could use Evernote or one of the many other notes apps.
    Sorry to sound so negative on Notes.app, it's OK but I don't think its the best place to put over 700 notes.

  • Error while importing text file to Power Pivot via Table Import Wizard

    Hello there,
    I'm a rookie at handling Excel to be honest. I've been trying to import a .txt file to Excel (it contains around 14 million rows of information) but Excel won't let me since it can only handle around 1 million rows per sheet (too troublesome to do such thing
    14 times in 14 different sheets). Then I googled that Power Pivot let me handle around 100 million rows in a Pivot.
    I'm trying to import this .txt file to Power Pivot by doing the following:
    Home tab > From Text > File Path (insert .txt location here) > Finish
    After that it shows the Table Import Wizard retrieving the rows from the .txt file. Problem is... at the end of the import (once it hits row 14,000,000 or so) it shows an error. It states the following:
    "Memory error: Allocation failure : Not enough storage is available to process this command. .
    The current operation was cancelled because another operation in the transaction failed."
    Please note that the size of the .txt file is 900 MB.
    Another thing is that, when I select the .txt file from its location at the File Path section, the "preview" field only shows 50 rows, not all of them. Is that okay to happen?
    Is it because the size of the .txt file is too big?
    Please let me know if you need more info in regards to this.
    Thanks in advance.

    Hi AdiUser,
    Only showing 50 rows for the preview is normal behaviour. Based on what you've described, it sounds like Power Pivot is running out of memory when you are loading this .txt file. Are you running the 32 bit or 64 bit version of Excel. Also, if you are running
    the 64 bit version how much RAM is available?
    If you're running the 32 bit version then the available RAM for Power Pivot is less than 1 GB even if the system has more than this installed. You can address this by installing the 64 bit version. If you're running the 64 bit version then it may be
    that you don't have enough RAM to accommodate this amount of data and you may consider upgrading the RAM. Alternatively, you could try and reduce the size of the table in memory by using the preview screen to remove any columns that are not of use. This
    is especially important if there are any column with a high number of unique values that aren't actually needed in the model. In addition to removing columns altogether, you could try filtering the data so that only a subset of the rows are imported.
    This can also be done from the preview screen.
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • Importing text file (delimited, fixed width) with MDM Import Manager?

    Hello all,
    According to the overview section of the import manager reference guide, it is possible to import from delimited text files (e.g. CSV).
    But when it comes to the details, text files are not mentioned anymore. I also found no option in the Import Manager.
    Could you tell me whether this is possible and - if it is - how?
    Thanks in advance!
    Kind regards,
    Dennis

    Hi Dennis,
    In order to import flat files into MDM do the following. This solution is specific to MS Windows:
    I. Set up ODBC for *.txt or *.csv files
    1. Open Data Sources (ODBC) interface:
    Start> Settings> Control Panel--> Administrative Tools -->Data Sources (ODBC).
    2. Select System DSN Tab in Data Sources (ODBC) interface.
    3. Click on [Add]. Select the Microsoft Text Driver. Click Finish.
    4. Write a Data Source Name
    5. Uncheck Use Current Directory to enable the [Select Directory…] button.
    6. Click on [Select directory…] to determine the source directory.
    7. Select the source file.
    8. Click [OK] and return to the ODBC Text Setup screen.
    9. Click [OK].
    10. Return to the ODBC Data Source Administrator dialog and click [OK].
    II. Importing from Flat file
    1. Run MDM Import Manager.
    2. Select ODBC from the Type drop-down field of the Connect To Source dialog.
    3. Enter the DSN name from the Setup ODBC Connection dialog above.
    4. Select the file name with extension (.csv or .txt) in the Tables panel of MDM Import Manager and the file content in the Records panel.
    Hope this solved your problem.Please mark helpful answers
    Regards,
    Santosh.

  • Importing Text file in to iTunes with song and artist names

    A friend made a compilation CD for me. He exported the artist and song names in to a text file from iTunes. I am having trouble importing the information in to my itunes. The people at the apple store said that it was not possible and that I would have to import his whole iTunes library.
    Thanks.
    imac    

    Hi Dennis,
    In order to import flat files into MDM do the following. This solution is specific to MS Windows:
    I. Set up ODBC for *.txt or *.csv files
    1. Open Data Sources (ODBC) interface:
    Start> Settings> Control Panel--> Administrative Tools -->Data Sources (ODBC).
    2. Select System DSN Tab in Data Sources (ODBC) interface.
    3. Click on [Add]. Select the Microsoft Text Driver. Click Finish.
    4. Write a Data Source Name
    5. Uncheck Use Current Directory to enable the [Select Directory…] button.
    6. Click on [Select directory…] to determine the source directory.
    7. Select the source file.
    8. Click [OK] and return to the ODBC Text Setup screen.
    9. Click [OK].
    10. Return to the ODBC Data Source Administrator dialog and click [OK].
    II. Importing from Flat file
    1. Run MDM Import Manager.
    2. Select ODBC from the Type drop-down field of the Connect To Source dialog.
    3. Enter the DSN name from the Setup ODBC Connection dialog above.
    4. Select the file name with extension (.csv or .txt) in the Tables panel of MDM Import Manager and the file content in the Records panel.
    Hope this solved your problem.Please mark helpful answers
    Regards,
    Santosh.

  • Address book .... importing text file

    I am designing an address book which opens a text file called AddressBook.txt which reads in the information in the following format:
    lastname,firstname,street,city,state,zip,phonenumber,birthday,persontype
    lastname2,firstname2,street2,city2,state2,zip2,phonenumber2,birthday2,persontype2
    etc. (with a maximum entries of 500)
    I am having a problem reading in the information without the commas and wrapping to the next line. I can either use the BufferedReader or Scanner to input the file and as you can see below, my code is not complete yet. I can't figure out how to code the storeAddress() method in order to get the addressBookEntries[] to include the necessary information for outputting, sorting, etc. If I can get the information read into the addressBookEntries[], I think I will probably be able to proceed in the rest of the required tasks (i.e. sorting by last name, searching by last name, etc.)
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    *  @created September 14, 2004
    *  This program uses a JFrame to manipulate data and form an
    *  address book.  The user will be able to load data from a file,
    *  sort it by last name, print the address, phone number, and date
    *  of birth, print the names of people whos birthday are between 2
    *  dates, print the names of people between 2 last names, and/or
    *  print the names of different person types.
    public class AddressBook extends JPanel implements ActionListener{
        JFrame frame;
        final int numButtons = 7;
        JRadioButton[] radioButtons = new JRadioButton[numButtons];
        JButton process = new JButton("Process Request");
        JLabel title;
        JTextArea output = new JTextArea(30,50);
        int MAX_ADDRESS_ENTRIES = 500;
        AddressBookEntry addressBookEntries[] =
            new AddressBookEntry[MAX_ADDRESS_ENTRIES];
        String FILE_NAME="AddressBook.txt";
        public AddressBook(JFrame frame){
            super(new BorderLayout());
            this.frame=frame;
            JPanel choicePanel = createSimpleDialogBox();
            choicePanel.setBorder(BorderFactory.createTitledBorder("Choices" +
            " to choose from:"));
            title = new JLabel("<html><h2> Thank you for opening the " +
            "Address Book.  " +
            "Please Press the \"Process Request\" " +
            "after making a choice.</h2></html>\n",JLabel.CENTER);
            title.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
            output.setEditable(false);
            add(title, BorderLayout.NORTH);
            add(choicePanel, BorderLayout.CENTER);
            add(output, BorderLayout.SOUTH);
            final ButtonGroup group = new ButtonGroup();
            final String saveCommand = "Save";
            final String sortByLN = "Sort by Last Name";
            final String searchLNCommand = "Search By Last Name";
            final String printAPD = "Print address, phone number, and DOB";
            final String printNamesDOB = "Print names of people whose birthday" +
            " falls between 2 dates";
            final String printNamesLN = "Print names of people who fall" +
            " between 2 last names";
            final String printPType = "Print all family members, friends, or" +
            " business associates";
        private JPanel createSimpleDialogBox(){
            radioButtons[0] = new JRadioButton(
              "<html>Save the address file</html>");
            radioButtons[0].setActionCommand(saveCommand);
            radioButtons[1] = new JRadioButton(
              "<html>Sort the address file by last name</html>");
            radioButtons[1].setActionCommand(sortByLN);
            radioButtons[2] = new JRadioButton(
              "<html>Search the address file by last name</html>");
            radioButtons[2].setActionCommand(searchLNCommand);
            radioButtons[3] = new JRadioButton(
              "<html>Print the address, phone number, and DOB of a specified" +
              " person</html>");
            radioButtons[3].setActionCommand(printAPD);
            radioButtons[4] = new JRadioButton(
              "<html>Print the names of people whose birthday falls between" +
              " two dates</html>");
            radioButtons[4].setActionCommand(printNamesDOB);
            radioButtons[5] = new JRadioButton(
              "<html>Print the names of people who fall between two" +
              " specified last names</html>");
            radioButtons[5].setActionCommand(printNamesLN);
            radioButtons[6] = new JRadioButton(
              "<html>Print all family members, friends, <u>OR</u>" +
              " business associates</html>");
            radioButtons[6].setActionCommand(printPType);
            for (int i=0; i<numButtons; i++){
                group.add(radioButtons);
    //set the first button (open file) to be selected
    radioButtons[0].setSelected(true);
    return createPane(radioButtons, process);
    private JPanel createPane(JRadioButton[] radioButtons,
    JButton showButton) {
    int numChoices = radioButtons.length;
    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    for (int i = 0; i < numChoices; i++) {
    box.add(radioButtons[i]);
    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.NORTH);
    pane.add(showButton, BorderLayout.SOUTH);
    return pane;
    public void actionPerformed(ActionEvent e) {
    String command = group.getSelection().getActionCommand();
    //else if button pushed is save
    if (command == saveCommand){
    // save file
    //else if button pushed is search by last name
    else if (command == sortByLN){
    // search by last name
    //else if button pushed is sort by last name
    else if (command == searchLNCommand){
    // sort by last name
    // print to screen
    //else if button pushed is display address, ph#, dob
    else if (command == printAPD){
    // display "search by last name" dialog
    // search last names
    // if last name found
    // print data
    // else
    // print error notification "person not found"
    //else if button pushed is list names of people whose
    //bday between 2 days
    else if (command == printNamesDOB){
    // ask for which dates
    // search bday
    // print to screen
    //else if button pushed is print names of people between 2 last names
    else if (command == printNamesDOB){
    // ask for which two last names
    // search last names
    // if people found
    // print to screen
    //else
    //print error notification "no one found"
    //else if button pushed is print all family members, friends
    //or business associates
    else if (command == printPType){
    //ask for what person type
    //search person types
    //if people found
    //print to screen
    //else print "no one found"
    public void storeAddress(File addressFile){
         Scanner sc=null;
    String lname,fname,street,city,state,zip,phone,persontype,bday;
    try {
    // Delimiters specifiy where to parse tokens in a scanner
    sc = new Scanner(addressFile).useDelimiter("\\s*[\\p{,}*\\s+]\\s*");
    catch (FileNotFoundException fnfe) {
         JOptionPane.showMessageDialog(this,"Could not open the file");
    System.exit(-1);
    for(int i=0; i<MAX_ADDRESS_ENTRIES; i++){
         while (sc.hasNext()) {
    lname=(sc.next());
         if (!lname.equals("")){
         addressBookEntries[i].setLName()=lname;
    public class AddressBookEntry{
    private extPerson address;
    private String date;
    private extPerson ExtPerson;
    public class Person{
    protected String lastName, firstName;
    private String address;
    private String city;
    private String state;
    private String zipcode;
    private String homephone;
    private String extPersonType;
    private Date bday;
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-DD");
    public String toString() {
    return lastName+" "+firstName;
    public void setLName(String last) {
    lastName=last;
    public void setFName(String first){
    firstName=first;
    public String getLastName() {
    return lastName;
    public String getFirstName() {
    return lastName;
    public Person() {
    lastName="";
    firstName="";
    public Person(String first, String last){
    setLName(last);
    setFName(first);
    //Set the address and return it
    public void setAddress( String addr ){
    address = addr;
    public String getAddress(){
    return address;
    //set the city and return it
    public void setCity( String town ){
    city = town;
    public String getCity(){
    return city;
    //set the state and return it
    public void setState( String st )
    state = st;
    public String getState()
    return state;
    //Set the zip code and return it
    public void setZipCode( String zip ){
    zipcode = zip;
    public String getZipCode(){
    return zipcode;
    //Set the home phone and return it
    public void setHomePhone( String homeph ){
    homephone = homeph;
    public String getHomePhone(){
    return homephone;
    //Set the bday and return it
    public Date getBday(){
    return bday;
    public void setBday(Date newBday) {
    bday = newBday;
    dateFormat.format(bday);
    //Set the extPerson type and return it
    public String getPType(){
    return extPersonType;
    public void setPBusiness(){
    extPersonType = "Business Associate";
    public void setPFamily(){
    extPersonType = "Family Member";
    public void setPFriend(){
    extPersonType = "Friend";
    public class extPerson extends Person{
    //new clss People
    public class People {
         int MAX_PEOPLE=500;
         BufferedReader bf;
    public String toString() {
              StringBuffer sb=new StringBuffer();
              for (int i=0; i<nPeople; i++)
              sb=sb.append(group[i]+"\n");
              return sb.toString();
    public void read(){
              String str;
              try {
              bf=new BufferedReader(new FileReader(new File(FILE_NAME)));
              str=bf.readLine();
              while (str!=null) {
              insert(str);
                   str=bf.readLine();
         catch (IOException e) {
              // Will jump to here on an eof condition.
         try {
              bf.close();
         catch (IOException e) {}
         public void save() {
              try {
              PrintWriter pw=new PrintWriter(FILE_NAME);
              for (int i=0; i<nPeople; i++)
              pw.println(group[i]+",");
              pw.close();
         catch (FileNotFoundException fne) {
                   System.out.println("Could not Save "+FILE_NAME);
    public People() {
              group=new extPerson[MAX_PEOPLE];
              nPeople=0;
         public boolean insert(String data) {
              if (nPeople<MAX_PEOPLE) {
              //extPerson guy=new extPerson(data);
              //group[nPeople]=guy;
              nPeople++;
              return true;
         else {
         JOptionPane.showMessageDialog(null,"Error in People" +
    "::insert: Max size reached.");
         return false;
         public void clear() {
              // This loop frees up the memory used by each extPerson
              for (int i=0; i<nPeople; i++)
              group[i]=null;
              nPeople=0;
    extPerson group[];
    int nPeople;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    public static void createAndShowGUI(){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Address Book Program");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    c.add(new AddressBook(frame));
    frame.pack();
    frame.setVisible(true);
    public static void main (String s[]){       
    //Schedule a job for the event-dispatching thread:
    //creating and showign this application's GUI
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();

    Ok, I have changed my code to reflect your suggested changes, but I'm still unsure how to use the findInLine you suggested.... This is all very new to me and I've been looking on the java website for suggestions, but I'm still stumped on how to pull this together. I'm unsure on how to set the lastname,firstname,etc. for retrieval...
    Here's my code:
    //ADDRESS BOOK
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    *  @created September 14, 2004
    *  This program uses a JFrame to manipulate data and form an
    *  address book.  The user will be able to load data from a file,
    *  sort it by last name, print the address, phone number, and date
    *  of birth, print the names of people whos birthday are between 2
    *  dates, print the names of people between 2 last names, and/or
    *  print the names of different person types.
    public class AddressBook extends JPanel implements ActionListener{
        JFrame frame;
        final int numButtons = 7;
        JRadioButton[] radioButtons = new JRadioButton[numButtons];
        JButton process = new JButton("Process Request");
        JLabel title;
        JTextArea output = new JTextArea(30,50);
        int MAX_ADDRESS_ENTRIES = 500;
        AddressBookEntry addressBookEntries[] = new
        AddressBookEntry[MAX_ADDRESS_ENTRIES];
        public AddressBook(JFrame frame){
            super(new BorderLayout());
            this.frame=frame;
            JPanel choicePanel = createSimpleDialogBox();
            choicePanel.setBorder(BorderFactory.createTitledBorder("Choices" +
            " to choose from:"));
            title = new JLabel("<html><h2> Thank you for opening the " +
            "Address Book.  " +
            "Please Press the \"Process Request\" " +
            "after making a choice.</h2></html>\n",JLabel.CENTER);
            title.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
            output.setEditable(false);
            add(title, BorderLayout.NORTH);
            add(choicePanel, BorderLayout.CENTER);
            add(output, BorderLayout.SOUTH);
            final ButtonGroup group = new ButtonGroup();
            final String saveCommand = "Save";
            final String sortByLN = "Sort by Last Name";
            final String searchLNCommand = "Search By Last Name";
            final String printAPD = "Print address, phone number, and DOB";
            final String printNamesDOB = "Print names of people whose birthday" +
            " falls between 2 dates";
            final String printNamesLN = "Print names of people who fall" +
            " between 2 last names";
            final String printPType = "Print all family members, friends, or" +
            " business associates";
        private JPanel createSimpleDialogBox(){
            radioButtons[0] = new JRadioButton(
              "<html>Save the address file</html>");
            radioButtons[0].setActionCommand(saveCommand);
            radioButtons[1] = new JRadioButton(
              "<html>Sort the address file by last name</html>");
            radioButtons[1].setActionCommand(sortByLN);
            radioButtons[2] = new JRadioButton(
              "<html>Search the address file by last name</html>");
            radioButtons[2].setActionCommand(searchLNCommand);
            radioButtons[3] = new JRadioButton(
              "<html>Print the address, phone number, and DOB of a specified" +
              " person</html>");
            radioButtons[3].setActionCommand(printAPD);
            radioButtons[4] = new JRadioButton(
              "<html>Print the names of people whose birthday falls between" +
              " two dates</html>");
            radioButtons[4].setActionCommand(printNamesDOB);
            radioButtons[5] = new JRadioButton(
              "<html>Print the names of people who fall between two" +
              " specified last names</html>");
            radioButtons[5].setActionCommand(printNamesLN);
            radioButtons[6] = new JRadioButton(
              "<html>Print all family members, friends, <u>OR</u>" +
              " business associates</html>");
            radioButtons[6].setActionCommand(printPType);
            for (int i=0; i<numButtons; i++){
                group.add(radioButtons);
    //set the first button (open file) to be selected
    radioButtons[0].setSelected(true);
    return createPane(radioButtons, process);
    private JPanel createPane(JRadioButton[] radioButtons,
    JButton showButton) {
    int numChoices = radioButtons.length;
    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    for (int i = 0; i < numChoices; i++) {
    box.add(radioButtons[i]);
    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.NORTH);
    pane.add(showButton, BorderLayout.SOUTH);
    return pane;
    public void actionPerformed(ActionEvent e) {
    String command = group.getSelection().getActionCommand();
    //else if button pushed is save
    if (command == saveCommand){
    // save file
    //else if button pushed is search by last name
    else if (command == sortByLN){
    // search by last name
    //else if button pushed is sort by last name
    else if (command == searchLNCommand){
    // sort by last name
    // print to screen
    //else if button pushed is display address, ph#, dob
    else if (command == printAPD){
    // display "search by last name" dialog
    // search last names
    // if last name found
    // print data
    // else
    // print error notification "person not found"
    //else if button pushed is list names of people whose
    //bday between 2 days
    else if (command == printNamesDOB){
    // ask for which dates
    // search bday
    // print to screen
    //else if button pushed is print names of people between 2 last names
    else if (command == printNamesDOB){
    // ask for which two last names
    // search last names
    // if people found
    // print to screen
    //else
    //print error notification "no one found"
    //else if button pushed is print all family members, friends
    //or business associates
    else if (command == printPType){
    //ask for what person type
    //search person types
    //if people found
    //print to screen
    //else print "no one found"
    public class AddressBookEntry{
    private extPerson address;
    private String date;
    private extPerson ExtPerson;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    public static void createAndShowGUI(){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Address Book Program");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    c.add(new AddressBook(frame));
    frame.pack();
    frame.setVisible(true);
    public static void main (String s[]){       
    //Schedule a job for the event-dispatching thread:
    //creating and showign this application's GUI
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    //PERSON
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    public class Person{
    protected String lastName, firstName;
    private String address;
    private String city;
    private String state;
    private String zipcode;
    private String homephone;
    private String extPersonType;
    private String bday;
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-DD");
    public void parseString(String s) {
              try {
              lastName = s.substring(0,s.indexOf(","));
              firstName = s.substring(s.indexOf(",")+1);
    address = s.substring(s.indexOf(",")+2);
    city = s.substring(s.indexOf(",")+3);
    state = s.substring(s.indexOf(",")+4);
    zipcode = s.substring(s.indexOf(",")+5);
    homephone = s.substring(s.indexOf(",")+6);
    extPersonType = s.substring(s.indexOf(",")+7);
    bday = s.substring(s.indexOf(",")+8);
    catch(StringIndexOutOfBoundsException sbe) {
              JOptionPane.showMessageDialog(null,"Error " +
    "in Person: Could not parse the line "+s);
    public String toString() {
    return lastName+","+firstName+","+address+","+city+","+
    state+","+zipcode+","+homephone+","+bday+","+extPersonType;
    public void setLName(String last) {
    lastName=last;
    public void setFName(String first){
    firstName=first;
    public String getLastName() {
    return lastName;
    public String getFirstName() {
    return lastName;
    public Person() {
    lastName="";
    firstName="";
    public Person(String first, String last){
    setLName(last);
    setFName(first);
    //Set the address and return it
    public void setAddress( String addr ){
    address = addr;
    public String getAddress(){
    return address;
    //set the city and return it
    public void setCity( String town ){
    city = town;
    public String getCity(){
    return city;
    //set the state and return it
    public void setState( String st )
    state = st;
    public String getState()
    return state;
    //Set the zip code and return it
    public void setZipCode( String zip ){
    zipcode = zip;
    public String getZipCode(){
    return zipcode;
    //Set the home phone and return it
    public void setHomePhone( String homeph ){
    homephone = homeph;
    public String getHomePhone(){
    return homephone;
    //Set the bday and return it
    public String getBday(){
    return bday;
    public void setBday(String newBday) {
    bday = newBday;
    dateFormat.format(bday);
    //Set the extPerson type and return it
    public String getPType(){
    return extPersonType;
    public void setPBusiness(){
    extPersonType = "Business Associate";
    public void setPFamily(){
    extPersonType = "Family Member";
    public void setPFriend(){
    extPersonType = "Friend";
    public Person(String data) {
    parseString(data);
    //EXTPERSON
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    //new clss extPerson
    public class extPerson extends Person {       
         int MAX_PEOPLE=500;
         BufferedReader bf;
    String lname,fname,street,city,state,zip,phone,persontype,bday;
    String FILE_NAME="AddressBook.txt";
    public String toString() {
              StringBuffer sb=new StringBuffer();
              for (int i=0; i<nPeople; i++)
              sb=sb.append(group1[i]+"\n");
              return sb.toString();
         public void save() {
              try {
              PrintWriter pw=new PrintWriter(FILE_NAME);
              for (int i=0; i<nPeople; i++)
              pw.println(group1[i]+",");
              pw.close();
         catch (FileNotFoundException fne) {
                   System.out.println("Could not Save "+FILE_NAME);
    public extPerson() {
              group1=new extPerson[MAX_PEOPLE];
              nPeople=0;
         public boolean insert(String data) {
              if (nPeople<MAX_PEOPLE) {
              Person guy = new Person(data);
              group1[nPeople]=guy;
              nPeople++;
              return true;
         else {
         JOptionPane.showMessageDialog(null,"Error in People" +
    "::insert: Max size reached.");
         return false;
    Person group1[];
    int nPeople;

  • Importing text file databases into address book

    I have a large csv formatted (all that easily allowed by my exporting database) that I want to import into addressbook. By the instructions this should work and so I diligently configured the "Text file import" screen to align the fields as they should be imported - and the sample entries shown in that window look and are configured exactly as they should be. However, when I click on the OK button in the "Text file import" window, I could not tell if it was importing one item or the thousands. But when I look at the address book it indicates that it imported all thousands of contacts. THE PROBLEM is that in the address book (which was previously essentially empty) the only items listed under "Names" is "No Name" (a huge number of them) and each one has NO other fields filled in. So it appears that nothing is importing despite that the Text file import screen shows everything set up correctly. Thoughts/help?

    My problem is the same as Roderick. Text File Import reads my file and shows me the data that it will import. I dilligently assign all of the appropriate columns and press "OK"...Nothing happens. Any ideas?

  • Importing text file to address book?

    I created a text tab-delimited file for import. From within Address Book, ran "Import". Matched up field names. All looked good. When I clicked on "OK" basically very little happened. After a few seconds the blue OK button became clear but nothing else. I advanced another record, clicked OK on it and same few seconds then nothing. I expected all the records to be imported.
    In any case, tried this individually with a few records, then checked the Address Book and none of the info was in there.
    Is this some kind of bug? I don't see that I did anything that was wrong with the import.
    Advice appreciated.
    Richard

    Not sure if this helps, but ...
    I made a quick text file to see if I could duplicate your problem. I put in three lines, the first with field names (First, Last, Work) and the other two with corresponding data. The values within each line were tab separated. When I ran AB's import I had to match up the third field to correspond with email (work). I flicked through the displayed records (all two of them!!) and they displayed as contact cards. I then clicked OK, and unlike your description, the import dialogue immediately vanished. The records were correctly imported.
    When you look at the records in the import dialog do they all display correctly?
    Could it be a 10.4.3 issue?
    After attempting to do the import, has your contact count gone up?
    What happens if you select the "last import" group?

  • Dynamic Distribution Group set conditions by importing text file?

    Exchange 2010 SP2.
    I created a dynamic distribution group via the EMC.  We have populated AD with ExtenstionAttribute1 and ExtensionAttribute2.  I have created the ddg with custom attribute1 value = employee.  What I need to do now is  populate custom attribute
    2 = 00-0001, 00-0002, and so on.  There are about 300 of these numbers I need to add.  I have them in a text file or csv file.  Instead of adding them one by one in the EMC, is there a way to import them via powershell to the existing ddg? 
    The ddg is called All Management Employees.

    If they go from 00-0001 to 00-0300, you could just add them as follows:
    Set-DynamicDistributionGroup <group name> -RecipientFilter "(CustomAttribute1 -eq 'employee') -and (CustomAttribute2 -like '00-0*')"
    However, if you have additional items like this (such as 00-0350, etc), you may need to use the following:
    Set-DynamicDistributionGroup <group name> -RecipientFilter "(CustomAttribute1 -eq 'employee') -and ((CustomAttribute2 -like '00-00*') -or (CustomAttribute2 -like '00-01*') -or (CustomAttribute2 -like '00-02*') -or (CustomAttribute2 -eq '00-00300')"
    Now, if your numbering isn't sequential and it can't be, you would need to add them individually - which may make your search filter unusable, in which case, you may need to create several dynamic groups and add them to a parent group.

  • Uploading Importing text file & crosstab display

    <p> I want to upload a text tab delimited file into our db, currently we
    are uploading it to a temp table in the db, do some validation checks and write
    to a table when done. I have two questions:</P>
    <p> 1) Is there a more efficient way of upload/importing flat files into
    the db via forms, like loading data into a non db data block and working on the
    data via loops rather than sql in a temp table.</P>
    <P> 2) I want to present the data to the user(for verification) via a form
    screen as they have read it in, the only way I can think of doing this, is
    populating a temp table and then using a data block based on a stored procedure
    that contains a dynamic pivot query package since I don't know the
    number of columns that the file will contain. Data blocks can do either
    vertical or horizontal alignment but not grid.</P>
    <P> File will take the format of: </P>
               col1           col2            col3
    row1    data_r1c1   data_r1c2   data_r1c3
    row2    data_r2c1   data_r2c2   data_r2c3
    row3    data_r3c1   data_r3c2   data_r3c3
    row4    data_r4c1   data_r4c2   data_r4c3
    <BR>
         <P>Thank you in advance </P>

    Thank you for your reply
    1) It's a utility for users and so it has to be through forms
    Presently I think it is better to read it in to a temp table then I can use sql for validation which would be faster than looping through blocks. But with this approach I'm just a little worried about Lost Updates e.g. what if someone is changing scores in the regular update screen while another person is trying to import them via the import utility.
    2) I have to use a stored procedure because I don't know how many columns a user will want to load in, sometimes it could be 2,3 or 5 etc. So basically I am looking at a way of presenting the data from it's stored format in it's read in format i.e. file format
    File format =
             col1           col2            col3           coln
    row1  data_r1c1   data_r1c2   data_r1c3   data_r1cn
    row2  data_r2c1   data_r2c2   data_r2c3   data_r2cn
    row3  data_r3c1   data_r3c2   data_r3c3   data_r3cn
    rown  data_rnc1   data_rnc2   data_rnc3   data_rncn
    It is stored in the temp table as
    row1    col1   data_r1c1
    row2    col1   data_r2c1
    row1    col2   data_r1c2
    row2    col2   data_r2c2
    Example
             Test1    Test2    Test3    Test4
    John   54        45         70         65
    Jane   38        55         72         70
    Stored in the temp and subsequently written to Student Score table as
    Student    Test      Score
    John        Test1    54
    John      Test2      45
    John      Test3      70
    John      Test4      65
    Jane      Test1      38
    Jane      Test2      55
    Jane      Test3      72
    Jane      Test4      70

  • Error importing text file into SQL Server when last column is null

    Hello all. Happy holidays!
    I'm trying to import a text file into a SQL Server table, and I get the error below when it gets to a row (row 264) that has null in the last column. I'm guessing the null jumbles up the delimiters somehow. The nulls are not errors, and I need to import
    them into the table with the rest of the rows. Any idea how I can do that?
    Thanks!
    [Flat File Source [1]] Error: Data conversion failed. The data conversion for column "XYZ" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
    [Flat File Source [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "XYZ" (178)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "XYZ"
    (178)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
    [Flat File Source [1]] Error: An error occurred while processing file "ABC.txt" on data row 264.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Flat File Source" (1) returned error code 0xC0202092.  The component returned a failure code when the pipeline engine called PrimeOutput().
    The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    WeeLass

    Hi WeeLass,
    The error that” Data conversion failed. The data conversion for column "XYZ" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".” is generally error message, and the error indicates
    that there is data type mismatch issue between the input columns and the output columns.
    Based on your description, the issue is that you trying to convert a column contains empty value from string to integer data type for the output column "XYZ" in Flat File Source [1]. Please note that we cannot type an empty value as integer data
    type column value, so the error occurs.
    To fix this issue, just as you did, we should convert the data type for the output column "XYZ" in Flat File Source [1] back to DT_WSTR or DT_STR, then use a derived column task to replace the current column (UBPKE542). But the expression should
    be like below:
    LEN(TRIM(UBPKE542)) > 0 ? (DT_I8)UBPKE542 : NULL(DT_I8)
    In this way, the data type of the column in SQL table would be int, and the empty value would be replaced with NULL.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Problem importing text file with null value

    I used the following codes to import a text file and it
    worked perfectly.
    However, it skipped the TAB (chr(9)) on the imported row when
    there is no data (empty string) in one of the columns.
    Can someone help? thanks!
    sample text file data:
    00001 desc1 12.00
    00002 25.00
    00003 desc2 15.00
    Code that I used:
    <cffile action="read" file="#FilePath#"
    variable="data">
    <cfset newLine = chr(13) & chr(10)>
    <cfset tabChar = chr(9)>
    <cfoutput>
    <cfloop list="#data#" index="row"
    delimiters="#newLine#">
    <cfset cols = listToArray(row, tabChar)>
    ID = #cols[1]#
    desc = #cols[2]#
    price = #cols[3]# <br>
    </cfloop>
    </cfoutput>

    There is no perfect way to handle this with out you writing
    more complicated code.
    A good compromise is to replace this line:
    <cfset cols = listToArray(row, tabChar)>
    with this:
    <cfset cols = listToArray (Replace (row, tabChar &
    tabChar, tabChar & "{empty}" & tabChar, "ALL"),
    tabChar)>

  • Importing text file into database

    Hi again,
    Could anyone give me any pointers on how to take a text file or csv file (or any other delimeted text file) and read the contents into java and then use the read in data to then insert the delimeted data into the table.
    i assume i have to read the delimeted data into a variable then parse the complete string with the delimeter and split the data up maybe in an array. Maybe this is completely wrong, im really unsure.
    any help would be greatly appreciated even a point in the right direction would be great :)
    kind regards.

    Well, atleast i dont know of a single method, which does this kind of nonhomogenous task!! Its not hard to impliment what you want-->
    //open the text file using FileInputStream & get the contents in a String variable
    //Tokenise it
    StringTokenizer st=new StringTokenizer(your_string_retrieved_from_file,delimiter);
    int i=0;
    while(st.hasMoreTokens())
    i++;
    //SQL Statement that inserts a string into database table(integer, varchar2)
    insert into test_table values(i,st.nextToken());
    Unless you are talking about putting the tokens as coloums in a single row, i dont find why this is a problem & if you are actually doing the above case, then you might wanna rethink your design

Maybe you are looking for