[plt-scheme] mysterx and excel

From: Ron Stanonik (stanonik at Cogsci.ucsd.edu)
Date: Mon Jul 14 18:53:09 EDT 2003

I'm trying to use mysterx to get values from an excel spreadsheet.

  (require (lib "mysterx.ss" "mysterx"))
  (define app (cci/progid "Excel.Application"))
  (define wbooks (com-get-property app "Workbooks"))
  (define wbook (com-invoke wbooks "Open" "C:/stanonik/clock.xls"))
  (define sheet (com-get-property wbook "ActiveSheet"))
  (define r (com-get-property sheet "Range" "A1"))

    com-get-property (property "Range"): expects 1 to 2 arguments, given 0

Hmm, given 0?  What about "A1"?

The following corresponding Visual Basic code works.

   Set app = New excel.Application
   Set wbooks = app.workbooks
   Set wbook = workbooks.Open("C:/stanonik/clock.xls")
   Set sheet = wbook.ActiveSheet
   Set r = sheet.Range("A1")
   List1.AddItem r.Value

Any hints?

I'm running DrScheme 204, (mx-version) 204 on W2K and WXP.

Thanks,

Ron
stanonik at cogsci.ucsd.edu



Posted on the users mailing list.