pblomfield Posted September 23, 2010 Report Share Posted September 23, 2010 I'm currently copying umpteen cells from a row in an Excel sheet putting each cell's data into variables. It's painfully slow so I'm trying to speed things up by copying the whole row into a text variable and then copying each "cell's value" of that variable into separate variables. Each "cells value" is separated by a CR/LF so I could, possibly, find the position of each CR/LF and copy that bit of the original variable to the new variable but how do I find the position of the CR/LF? I can't type CR/LF in "get position of text" dialogue. Maybe I could change CR/LF into ^ which never occurs in my data and use that to separate each cell but can't figure a way to do that or maybe there's an even better way. Any help will be much appreciated - I've struggled for far too long. Quote Link to comment Share on other sites More sharing options...
kevin Posted September 23, 2010 Report Share Posted September 23, 2010 The ASCII (numeric) value for a CR is 13. The ASCII value for a LF is 10. This snippet will allow you to search for the position of CRLF in a string: Variable Set %T13% to ASCII Char of 13 Variable Set %T10% to ASCII Char of 10 Variable Set Integer %N1% from Position of Text in Variable %T1% Put '%T13%%T10% in the 'Search Text:' field of the 'Variable Set Integer from position of Text' command Quote Link to comment Share on other sites More sharing options...
pblomfield Posted September 23, 2010 Author Report Share Posted September 23, 2010 Many thanks, Kevin. I'm on my way. I found that the character between cells is a tab - ascii 9. Maybe the last char in the row will be the cr/lf. 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.