PageRenderTime 35ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

/xyzzy/lisp/wip/oletest.l

http://xyzzy.codeplex.com
LEX | 29 lines | 25 code | 4 blank | 0 comment | 0 complexity | fcbf9edeb22a73e6659c085c873f8de8 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. (require "ole")
  2. (defun excel-demo ()
  3. (interactive)
  4. (let (app chart)
  5. (setq app (ole-create-object "Excel.Application"))
  6. (setf #{app.Visible} t)
  7. #{app.Workbooks.Add}
  8. (setf #{app.Range["a1"].Value} 3)
  9. (setf #{app.Range["a2"].Value} 2)
  10. (setf #{app.Range["a3"].Value} 1)
  11. #{app.Range["a1:a3"].Select}
  12. (setq chart #{app.Charts.Add})
  13. (setf #{chart.Type} -4100) ; xl3DColumn
  14. (do ((i 0 (+ i 10)))
  15. ((> i 180))
  16. (setf #{chart.Rotation} i)
  17. (sit-for .1))
  18. (sit-for 1)
  19. #{app.ActiveWorkbook.Close[0]}
  20. #{app.Quit}))
  21. (defun ie-demo ()
  22. (interactive)
  23. (let ((ie (ole-create-object "InternetExplorer.Application")))
  24. (setf #{ie.Visible} t)
  25. #{ie.Navigate["http://wakusei.cplaza.ne.jp/archiver/"]}))