Ruby:
require 'win32ole'versus
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
using Microsoft.Office.Interop.Excel;Na, melik a kevésbé gány megoldás?
[...]
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";
}
(A szerkesztőségbe várjuk a jobb C#-os megoldásokat.)