Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
In-cell text problem
#1
The result values of "ex1" and "ex2" are different.
What should I do if the result of "ex2" is equal to "ex1" when I read the cell of Excel?

The result value of "ex2" must be the same as "ex1".

Macro Macro4
Code:
Copy      Help
out
;ex1
str TEXT
TEXT="TEST[]TEST2"
out TEXT

out "============="

;ex2
ExcelSheet  chkExcel.Init("")
,,,chkExcel.GetRangeInfo("<sel>" 0 0)
TEXT=chkExcel.Cell("<sel>" 0 3)
out TEXT


 


Attached Files Image(s)
   
#2
Replace [ with an escape sequence in this string. The Text dialog can help you.
Code:
Copy      Help
TEXT="TEST[]TEST2"
#3
If have "text1 [] text2" in cell a1 of "ex2", separate it like qm. But it does not separate.
The "findreplace" command and other similar commands are not recognized.

If separated by "text1 @@ text2", it is separated.

a1.findreplace ("@@", "[]")
#4
You could do something like this:
Macro Macro19
Code:
Copy      Help
out
;ex1
str TEXT
TEXT="TEST[]TEST2"
out TEXT

out "============="

;ex2
ExcelSheet  chkExcel.Init("")
,,,chkExcel.GetRangeInfo("<sel>" 0 0)
TEXT=chkExcel.Cell("<sel>" 1 3)
TEXT.findreplace("[" "")
TEXT.findreplace("]" "[]")
out TEXT


Forum Jump:


Users browsing this thread: 1 Guest(s)