473,382 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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’
Feb 20 '07 #1
16 4599
hariharanmca
1,977 1GB
Create a string slicing programme that will take data from a spreadsheet (as given) and output to a ‘delimited ASCII file’
use split(stringValue,delimitedString) return string array
Feb 20 '07 #2
sorry what is the code for that i am an amature
Feb 20 '07 #3
hydro
1
hi yeah what ks the code please it would be a great help
thanx
Feb 20 '07 #4
hariharanmca
1,977 1GB
sorry what is the code for that i am an amature
are you asking in Vb for split
Feb 20 '07 #5
yes please
Feb 20 '07 #6
hariharanmca
1,977 1GB
yes please

Private Sub splitStrintValue()
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
Feb 20 '07 #7
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
Feb 20 '07 #8
hariharanmca
1,977 1GB
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’.........?
Feb 20 '07 #9
sorry. M.Molloy@2005.ljmu.ac.uk*MR.MALACHI MOLLOY*<>*<266565>*<21111089509137> 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
Feb 20 '07 #10
hariharanmca
1,977 1GB
sorry. M.Molloy@2005.ljmu.ac.uk*MR.MALACHI MOLLOY*<>*<266565>*<21111089509137> 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(inputstring,"*") into an array then you can store in database
Feb 20 '07 #11
do you have a code example please
Feb 20 '07 #12
hariharanmca
1,977 1GB
sorry. M.Molloy@2005.ljmu.ac.uk*MR.MALACHI MOLLOY*<>*<266565>*<21111089509137> 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

Expand|Select|Wrap|Line Numbers
  1. ...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
Feb 20 '07 #13
thanks but i am using vb.2005 and some of the things do work any more ideas thanks
Feb 27 '07 #14
Jewkes
1
I was wondering how to import data from a text file in order to split it using vb 2005
Feb 27 '07 #15
hariharanmca
1,977 1GB
I was wondering how to import data from a text file in order to split it using vb 2005

I think same code work in VB 2005
Feb 27 '07 #16
Killer42
8,435 Expert 8TB
I was wondering how to import data from a text file in order to split it using vb 2005
If you need to know the basics of how to read a text file, you really should study the manual or online documentation - it is spelled out quite clearly.
Feb 27 '07 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Stu Cazzo | last post by:
I have the following: String myStringArray; String myString = "98 99 100"; I want to split up myString and put it into myStringArray. If I use this: myStringArray = myString.split(" "); it...
11
by: Carlos Ribeiro | last post by:
Hi all, While writing a small program to help other poster at c.l.py, I found a small inconsistency between the handling of keyword parameters of string.split() and the split() method of...
6
by: Senthil | last post by:
Code ---------------------- string Line = "\"A\",\"B\",\"C\",\"D\""; string Line2 = Line.Replace("\",\"","\"\",\"\""); string CSVColumns = Line2.Split("\",\"".ToCharArray());
19
by: David Logan | last post by:
We need an additional function in the String class. We need the ability to suppress empty fields, so that we can more effectively parse. Right now, multiple whitespace characters create multiple...
4
by: Itzik | last post by:
can i split this string string str = "aa a - bb-b - ccc" with this delimiter string del = " - " i want recieve 3 items : "aa a" , "bb-b" , "ccc"
4
by: Crirus | last post by:
There is a function somewhere to split a string with multiple tokens at a time? Say I have this: aaaa#bbbbb*ccccc$dddd I whould like to split it so the result whould be aaaa bbb
14
by: Ron | last post by:
Hello, I am trying to parse a string on the newline char. I guess vbCrLf is a string constant. How can I parse my string - data - on the newline char? .... data += ASCII.GetString(buffer, 0,...
3
by: Ben | last post by:
Hi I am creating a dynamic function to return a two dimensional array from a delimeted string. The delimited string is like: field1...field2...field3... field1...field2...field3......
5
by: kurt sune | last post by:
The code: Dim aLine As String = "cat" & vbNewLine & "dog" & vbNewLine & "fox" & vbNewLine Dim csvColumns1 As String() = aLine.Split(vbNewLine, vbCr, vbLf) Dim csvColumns2 As String() =...
2
by: Digital Fart | last post by:
following code would split a string "a != b" into 2 strings "a" and "b". but is there a way to know what seperator was used? string charSeparators = { "=", ">=", "<=" , "!=" }; string s1 =...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.