Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove spaces from file 1

Status
Not open for further replies.

joeythelips

IS-IT--Management
Aug 1, 2001
305
IE
Hi.

I'm using the following code to save an access table as a properly formatted csv file. However when i view the csv file in UNIX, spaces are appearing between the commas.
How can i prevent this?

Print #2, Str(meterref(i)) & "," & customername(i) & "," & Str(meterno(i)) & "," & Str(meterseq(i)) & "," & Str(Multiplier(i)) & "," & Reading(i) & "," & readingtype(i) & "," & Format(readingdate(i), "dd-mmm-yy") ' put a comma here followed by eg descripion(i) etc.
 
Hi

Using the Str function returns a string with a space in front.... one of those small VB things.... use the function Trim around it.... and you are set.... like this

Trim(Str(Value))

Have fun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top