NeVeR Posted July 20, 2018 Report Share Posted July 20, 2018 I have a macro that collects data from google analytics. There are about 10 different bits of data and I wanted to open a spread sheet at the end and paste is all. Which it does do.. However the data is not all in a line. the macro must copy space / line breaks etc from Google analytics that I can't see. So what I want is my data to be %T1%<tab>%T2%<tab>%T3%<tab> etc and when excel opens and it's typed out it's all in a line side by site. what is happening is it appears on many times so T1 will be 1st then t2 will be on the second line and t3 beside it.. then t456 will be on the next line etc. Is there a way to remove all line breaks / hidden spaces before it gets to the text type part ? Quote Link to comment Share on other sites More sharing options...
rberq Posted July 20, 2018 Report Share Posted July 20, 2018 Once you have isolated T1, T2, etc., try Variable Modify String [Trim] on each text variable. I think that will do it. There's also a [Left Trim] and a [Right Trim] option. Quote Link to comment Share on other sites More sharing options...
NeVeR Posted August 10, 2018 Author Report Share Posted August 10, 2018 How do I know what to trim if I can't see it ? Quote Link to comment Share on other sites More sharing options...
rberq Posted August 10, 2018 Report Share Posted August 10, 2018 Variable Modify String [Trim] removes spaces, line breaks, carriage returns, and the like from left and right ends of the variable. You don't "tell" Trim what to trim, it just does it. See Macro Express "Help" screens for further explanation. If you want to see what is there, you could write your text variables to a text file, then look at the file with a hex editor if you have one. But start by just trying Trim and see if it helps. Quote Link to comment Share on other sites More sharing options...
NeVeR Posted August 15, 2018 Author Report Share Posted August 15, 2018 ah i see. I didn't know that. Thanks I'll give that a go. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.