Advertisement
justyb11

Simple Example 02

Sep 3rd, 2017
3,160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM  *****  BASIC  *****
  2.  
  3. Sub Main
  4.  
  5.     Dim oWrkBk    as Object
  6.     Dim oSheet    as Object
  7.    
  8.     oWrkBk   = ThisComponent
  9.    
  10.     REM ** Getting by methods **
  11.     oSheet   = oWrkBk.getSheets().getByIndex(0)
  12.     oSheet.getCellByPosition(0,0).String = "Hello"
  13.    
  14.     REM ** Getting by property **
  15.     oSheet   = oWrkBk.Sheets(0)
  16.     oSheet.getCellByPosition(0,1).String = "Good Bye"
  17.    
  18.     REM ** Numbers use the Value not string property **
  19.     oSheet.getCellByPosition(0,2).Value = 1.578
  20.    
  21.  
  22. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement