Hello there,
I am retrieving the td tags using webrecorder, and pasting the contents into openoffice calc.
It works successfully however content in one td tag consume up five lines and when it pastes it into openoffice calc, it pastes into five cells (all in one column). Instead i want it to be pasted all in one cell.
eg.
Td contents look like this
$30/30 min
$20/hr
$40/90minutes
but i need it like this
$30/30 min, $20/hr, $40/90 minutes.
So i can get the content of the td tag but i dont know how to retrieve the content of each line. I was thinking something like check position if there is a \n. if there is a new line, then copy all characters upto \n into a new array of string and then delete the first line and repeat until no more lines left.
Any clues on how i might pull this off?
Ben
Contents in a TD tag consumes up five lines of text & Pa
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Replace carriage return line feeds with commas?
Let>comma=,
StringReplace>data,CRLF,comma,data
That will replace all occurences of CRLF pairs in the string with a comma. Which I think is what you want.
Let>comma=,
StringReplace>data,CRLF,comma,data
That will replace all occurences of CRLF pairs in the string with a comma. Which I think is what you want.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
>How do i get the count of lines in a td tag? or Is it
>possible to count the CRLF in a tag?
Or you may just need:
>possible to count the CRLF in a tag?
Code: Select all
Separate>data,CRLF,lines
If>lines_count>1
Let>comma=,
StringReplace>data,CRLF,comma,data
Endif
Code: Select all
Position>CRLF,data,1,p
If>p>0
..
.. data contains at least one CRLF pair ...
..
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?