Guest User

Untitled

a guest
Nov 18th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. Needs["NETLink`"];
  2.  
  3. xls = NETNew["Microsoft.Office.Interop.Excel.ApplicationClass"];
  4. xls@Visible = True;
  5.  
  6. wb = xls@Workbooks@Add[]
  7. ws = wb@Worksheets@Item[1]
  8.  
  9. ws@Cells[1, 1]@Value = 100;
  10. ws@Cells[2, 2]@Value = 200;
  11. ws@Cells[3, 3]@Value = 300;
  12.  
  13. For[i=1,i<10,i++,
  14. ws@Cells[i, i]@Value = i*100
  15. ]
Add Comment
Please, Sign In to add comment