Miért fogunk a jövőben excelt is Rubyban programozni?

Ruby:

require ‘win32ole’
excel = Win32ole.new(“Excel.Application”)
excel.visible = true
wb = excel.workbooks.add
ws = wb.activesheet
ws.range(‘A1:B5’).each do |cell|
cell.value = “Hello, World”
end

versus

using Microsoft.Office.Interop.Excel;
[…]
var excel = new ApplicationClass();
excel.Visible = true;
object missing = System.Reflection.Missing.Value;
var workbook = excel.Workbooks.Add(missing);
var range = excel.get_Range((object)”A1″, (object)”B5″);
foreach (Range r in range.Cells) {
r.Activate();
excel.ActiveCell.Value2 = “Alma”;
}

Na, melik a kevésbé gány megoldás?

(A szerkesztőségbe várjuk a jobb C#-os megoldásokat.)

Leave a Reply

Your email address will not be published. Required fields are marked *