Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Registry & File Input / Output

Post new topic   Reply to topic
Commas in text files
View previous topic :: View next topic  
Author Message
jws1
Newbie


Joined: 14 Jul 2005
Posts: 2

PostPosted: Jul 14th, 2005 09:12 AM    Post subject: Commas in text files Reply with quote

Hi,

I am currently having trouble reading a text file into an array and then pasting each array (i.e. each line of the text file) into an excel spread sheet. The whole thing is numerical, however some of the numbers when read out of a program have , (e.g. £3,456,043.00) and when reading these particular lines into excel and putting them into cells the "," make the program think its a new line. I would either like to bypass the way it thinks "," are line breaks or run a find/replace routine on either the whole text file or on each line before addressing it to an array.

Any more info, please ask.

Regards,

John.
Back to top
View user's profile Send private message
RoofRabbit
Regular


Joined: 06 Jul 2005
Posts: 95
Location: Lenoir, NC USA

PostPosted: Jul 19th, 2005 07:42 AM    Post subject: Reply with quote

If I understand, you are reading a file with comma delimited values which could also be large values with commas within themselves? Is this an accurate description?
_________________
Website - [link]
Back to top
View user's profile Send private message Visit poster's website ICQ Number
jws1
Newbie


Joined: 14 Jul 2005
Posts: 2

PostPosted: Jul 19th, 2005 01:08 PM    Post subject: Reply with quote

Hi,

Basically it is all account balances, however on copying some of the values from the screen the input box has taken the "," as shown (£3,455,000.00) and when the text file is read into the array the "," mean array values 0,1,2 are taken up by the previous value, when infact I want the whole 3,455,000.00 read into array space 0 (or what ever array space it is upto). So either searching and replacing all "," in the text file with "" or make the VB code ignore "," is what I am after.

hope this clears things up a little.

Chers,

John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Registry & File Input / Output All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic