Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Problem with Arrays

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1421
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Problem with Arrays
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Problem with Arrays - 10/1/2004 4:52:56 AM   
  bam229bam

 

Posts: 1
Score: 0
Joined: 10/1/2004
From:
Status: offline
I am receiving a flat file that is delimited by "|". I need to remove the spaces in the data field. Please let me know what I am doing wrong. Thanks!

I have tried the following:

strLine = objReadInputFile.Readline

arrRowData = Split(strLine, "|")

For i = LBound(arrRowData) to UBound(arrRowData)

'Tried the following things that don't work
strTrimRowData1 = Replace(CStr(arrRowData(i)), " ", "")
strTrimRowData2 = Trim(CStr(strTrimRowData))
strTrimRowData3 = Trim(strTrimRowData)

Wscript.Echo strTrimRowData1
Wscript.Echo strTrimRowData2
Wscript.Echo strTrimRowData3

Next
 
 
Post #: 1
 
 Re: Problem with Arrays - 10/1/2004 5:02:33 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
Try

strLine = Replace(objReadInputFile.Readline," ","")

(in reply to bam229bam)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Problem with Arrays Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts