Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple (I hope) Cut and Paste from Text File to Excel.
#2
opt slowkeys; spe 1000
ExcelSheet esWorkTab.Init("WorkTab")
int w=wait(1 WV win("TestApp" "HwndWrapper[TestApp.exe;*"))
str views

;; Copy the Report
lef 658 166 w 1
'Ca
views.getsel

;; Paste selection to cell H1 of WorkTab. (Have tried the following):
esWorkTab.SetCell(views "H1") ;; Puts entire string in H1 (well, not even the entire report)
esWorkTab.SetCell(views "H") ;; Produces: Error (RT) in <open ":1546: /314">Test Cut Paste:  0x80020009, Exception occurred. 0x3EC,. <help #IDP_ERR>
esWorkTab.SetCell(views 8) ;; Produces: Error (RT) in <open ":1546: /471">Test Cut Paste:  invalid index, must be >=1.
esWorkTab.SetCell(views "H:H") ;; Produces: Error (RT) in <open ":1546: /314">Test Cut Paste:  0x80020009, Exception occurred. 0x3EC,. <help #IDP_ERR>

;; Have also tried various combinations of getclip, setclip, getsel and setsel, but could not get output to H1.

;; Have also tried A{hvt}, but that seems to require a mouse click in cell H1, which I don't really want to do, as I can't rely on its xy location over time.
   esWorkTab.Activate and esWorkTab.SetCell("H1") wouldn't allow the A{hvt} to work.


Messages In This Thread
RE: Simple (I hope) Cut and Paste from Text File to Excel. - by wisemaj - 10-03-2019, 12:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)