Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. // Open the spreadsheet, get the first sheet, first worksheet, and first cell A1.
  2. // This is solely demo code to show basics; your actual code would do much more here.
  3. let spreadsheet: BRAOfficeDocumentPackage = BRAOfficeDocumentPackage.open(path)
  4.  
  5. let sheet: BRASheet = spreadsheet.workbook.sheets[0] as! BRASheet
  6. let worksheet: BRAWorksheet = spreadsheet.workbook.worksheets[0] as! BRAWorksheet
  7. let cell: BRACell = worksheet.cell(forCellReference: "A1")
  8. // Print some info to show the code works.
  9. //print(worksheet.name) // print "Sheet1"
  10. print(cell.stringValue())
  11.  
  12. let sheet: BRASheet = spreadsheet.workbook.sheets[0] as! BRASheet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement