Any way to export app data to an Excel spreadsheet (.xlsx file)?

Is there currently any API I can use in Swift which will allow me to export my app data to an Excel spreadsheet (.xlsx file)? I've been scouring the Internet and haven't been able to find such an API? Any suggestions for how to go about exporting data to Microsoft Excel?

Replies

Nobody can answer this?

Write a CSV file?

I'm sure there are non-swift open-source things to write .XLSX. Maybe not suitably licensed. But if you find something, you would just need a C or C++ to swift wrapper.

How complex is the document you need to create? XLSX is just XML, right?, so you could probably do it with a suitable template and an XML library.