how to split a string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 963852741159753
    New Member
    • Feb 2007
    • 8

    #1

    how to split a string

    Create a string slicing programme that will take data from a spreadsheet (as given) and output to a ‘delimited ASCII file’
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by 963852741159753
    Create a string slicing programme that will take data from a spreadsheet (as given) and output to a ‘delimited ASCII file’
    use split(stringVal ue,delimitedStr ing) return string array

    Comment

    • 963852741159753
      New Member
      • Feb 2007
      • 8

      #3
      sorry what is the code for that i am an amature

      Comment

      • hydro
        New Member
        • Feb 2007
        • 1

        #4
        hi yeah what ks the code please it would be a great help
        thanx

        Comment

        • hariharanmca
          Top Contributor
          • Dec 2006
          • 1977

          #5
          Originally posted by 963852741159753
          sorry what is the code for that i am an amature
          are you asking in Vb for split

          Comment

          • 963852741159753
            New Member
            • Feb 2007
            • 8

            #6
            yes please

            Comment

            • hariharanmca
              Top Contributor
              • Dec 2006
              • 1977

              #7
              Originally posted by 963852741159753
              yes please

              Private Sub splitStrintValu e()
              Dim strVal As String
              Dim charVal(11) As String
              strVal = "A,B,C,D,E,F,G, H,I,J,K"
              charVal = Split(strVal, ",")
              strVal = Join(charVal, "-")
              'Out Put of strVal = A-B-C-D-E-F-G-H-I-J-K
              End Sub

              Comment

              • 963852741159753
                New Member
                • Feb 2007
                • 8

                #8
                thanks but what i need is to read a txt file into an array string slice it and to write it back a delimted ascii file if can help much appreciated

                Comment

                • hariharanmca
                  Top Contributor
                  • Dec 2006
                  • 1977

                  #9
                  Originally posted by 963852741159753
                  thanks but what i need is to read a txt file into an array string slice it and to write it back a delimted ascii file if can help much appreciated
                  sorry, i am not getting 'delimited ASCII file’.........?

                  Comment

                  • 963852741159753
                    New Member
                    • Feb 2007
                    • 8

                    #10
                    sorry. M.Molloy@2005.l jmu.ac.uk*MR.MA LACHI MOLLOY*<>*<2665 65>*<2111108950 9137> the stars are the delimeters. what i need to do is seperate them into seperate colums and then import them into an access database any ideas. thanks m8

                    Comment

                    • hariharanmca
                      Top Contributor
                      • Dec 2006
                      • 1977

                      #11
                      Originally posted by 963852741159753
                      sorry. M.Molloy@2005.l jmu.ac.uk*MR.MA LACHI MOLLOY*<>*<2665 65>*<2111108950 9137> the stars are the delimeters. what i need to do is seperate them into seperate colums and then import them into an access database any ideas. thanks m8
                      i think some post are there to read from file and get the file input string then use split(inputstri ng,"*") into an array then you can store in database

                      Comment

                      • 963852741159753
                        New Member
                        • Feb 2007
                        • 8

                        #12
                        do you have a code example please

                        Comment

                        • hariharanmca
                          Top Contributor
                          • Dec 2006
                          • 1977

                          #13
                          Originally posted by 963852741159753
                          sorry. M.Molloy@2005.l jmu.ac.uk*MR.MA LACHI MOLLOY*<>*<2665 65>*<2111108950 9137> the stars are the delimeters. what i need to do is seperate them into seperate colums and then import them into an access database any ideas. thanks m8

                          Code:
                          ...Removed by Moderator
                          TheScripts has policies against providing students with answers to their assignments.

                          We are here to help, not to do the work for you.


                          i think this will help you
                          Last edited by Killer42; Feb 27 '07, 08:29 PM. Reason: TheScripts does not provide homework answers

                          Comment

                          • 963852741159753
                            New Member
                            • Feb 2007
                            • 8

                            #14
                            thanks but i am using vb.2005 and some of the things do work any more ideas thanks

                            Comment

                            • Jewkes
                              New Member
                              • Feb 2007
                              • 1

                              #15
                              I was wondering how to import data from a text file in order to split it using vb 2005

                              Comment

                              Working...