You can create a spreadsheet app totally in Swift. But it's a large task.
For the graphics:
- you create a class (subclass of NSViewController), with its associated xib : SpreadSheetView for instance
- you create the window
- Inside you create a view that will hold the spreadsheet cells and declare it as class : SpreadSheetView
- the draw method in SpreadSheetView is used to draw all lines and cell contents
- mouseDown methods in SpreadSheetView are used to interact with cells :
- you will have to manage a cellTextField : NSTextField to enter text in a cell
These are just the very basic principles, you'll have a lot to discover.
There are many examples you can learn from :
h ttps://stackoverflow.com/questions/37249979/how-to-create-a-table-like-spreadsheet-in-swift