Cloudmersive

Get Macros from an XLSX File in Swift

Microsoft applications (such as Excel) currently use Visual Basic for Applications (VBA) programming language to build macros that can be enabled or disabled from use, according to the user’s preferences. However, before you enable existing macros in a file, it’s a good idea to scan their content; all it takes is one infected macro to wreak havoc within your system. By running the following API in Swift, you will be able to identify macro information in Excel files and decide if the commands are safe to enable.

To call the function in Swift, simply input the Excel file and your API key into the below code:

import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

Now you can make an educated decision on whether any present macros are safe to run! If you need to obtain an API key, head over to the Cloudmersive website and register for a free account; this provides 800 calls/month across our library of APIs.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.