Pertama -tama buat objek Excel, menggunakan comobj: var excelapp: varian; .Visible: = true; : Exceldemo.xls '); Lembar Kerja [1] .Name: = 'Worksheet1'; 4] .value: = 'kolom keempat di baris pertama'; atur lebar kolom yang ditentukan (unit: jumlah karakter), ambil kolom pertama sebagai contoh: excelapp.activesheet.columns [1] .columnswidth: = 5; 8 Atur ketinggian baris yang ditentukan (unit: pound) (1 pound = 0,035 cm), mengambil contoh perilaku kedua: excelapp.activesheet.rows [2] .rowheight: = 1/0,035; 9 In Sisipkan Halaman sebelum baris 8: Excelapp.worksheets [1] .rows.pagebreak: = 1; : Excelapp.activesheet.range ['B3: D4'] .Border [2] .Weight: = 3; Formula sel dari baris pertama dan kolom keempat: excelapp.activesheet.cells [1,4] .clearcontents; ; Lanjutkan ke Halaman: a. .Activesheet.pageSetup.Headermargin: = 2/0.035; ; RightMargin: 2/0,035; Kabel Jaringan Sel Cetak: Excelapp.Activeheet.pagesetup.printgridlines: = true; [A1: E2 '] .COPY; ; Sisipkan baris atau kolom: a ] .Delete; b. Excelapp.activesheet.printpreview; Exit Excel: Excelapp.Quit;