Hi Morgan,
Actually, conversion from VBScript is easier than to VBScript because you should not bother whether or not use the Set keyword.
For the link that you mentioned I got this (untested, just converted while writing this reply):
procedure main();
var ServiceManager : OleVariant;
var Desktop : OleVariant;
var Document : OleVariant;
var Sheets : OleVariant;
var Sheet : OleVariant;
var SaveParam : OleVariant;
var i, j : integer;
var arr : OleVariant;
begin
ServiceManager := Sys.OleObject('com.sun.star.ServiceManager');
Desktop := ServiceManager.createInstance('com.sun.star.frame.Desktop');
// arr = Array()
arr := BuiltIn.CreateVariantArray(0, -1);
Document := Desktop.LoadComponentFromURL('private:factory/scalc', '_blank', 0, arr);
Sheets := Document.getSheets();
Sheet := Sheets.getByIndex(0);
Sheet.getCellByPosition(0, 0).SetFormula('My Table Title');
for i := 0 to 9 do
begin
Sheet.getCellByPosition(i, 1).SetFormula(aqString.Format('Column %i', i+1));
for j := 0 to 9 do
Sheet.getCellByPosition(i, j+2).Value := i + j;
end;
SaveParam := ServiceManager.Bridge_GetStruct('com.sun.star.beans.PropertyValue');
SaveParam.Name := 'FilterName';
SaveParam.Value := 'MS Excel 97';
arr := BuiltIn.CreateVariantArray(0, 0);
arr[0] := SaveParam;
Document.storeToURL('file:///c:/test.xls', arr);
end;
Hope, this will help...
P.S. I failed to make correct formatting, so please replace [ ] with a space and ['] with a single quote