[ruby-talk:00302] Re: win32ole extension

From: "Michael Neumann" <neumann@...>
Date: 1999-05-08 09:02:46 UTC
List: ruby-talk #302
> I'm trying to build the win32ole ext.
> 
> I must be screwing something up. It builds the DLL
> but I keep getting:
>     "A device attached to the system is not functioning"
> 
> Any ideas?
> 
> Does anyone have a build of this extension?


Which version of ruby do you use?
I have 1.25 where win32ole.dll is already build.
And there are also some OLE examples using win32ole.dll which are working!



Michael

Attachments (2)

win32ole.dll (16.5 KB, application/x-msdownload;format=pe32)
excel1.rb (553 Bytes, text/x-ruby)
require 'win32ole'
#application = WIN32OLE.new('Excel.Application.5')
application = WIN32OLE.new('Excel.Application')
application.visible = TRUE
workbook = application.Workbooks.Add();
worksheet = workbook.Worksheets(1);
worksheet.Range("A1:D1").value = ["North","South","East","West"];
worksheet.Range("A2:B2").value = [5.2, 10];
worksheet.Range("C2").value = 8;
worksheet.Range("D2").value = 20;
range = worksheet.Range("A1:D2");
range.Select
chart = workbook.Charts.Add;
workbook.saved = TRUE;
application.ActiveWorkbook.Close(0);
application.Quit();

In This Thread

Prev Next