Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughbe/officeformreader
Swift definitions for structures, enumerations and functions defined in [MS-OFORMS]
https://github.com/hughbe/officeformreader
Last synced: 2 days ago
JSON representation
Swift definitions for structures, enumerations and functions defined in [MS-OFORMS]
- Host: GitHub
- URL: https://github.com/hughbe/officeformreader
- Owner: hughbe
- Created: 2020-11-30T13:31:14.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-16T14:28:42.000Z (about 4 years ago)
- Last Synced: 2024-11-10T12:47:31.219Z (about 2 months ago)
- Language: Swift
- Size: 91.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OfficeFormReader
Swift definitions for structures, enumerations and functions defined in [MS-OFORMS](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oforms/)
## Example Usage
Add the following line to your project's SwiftPM dependencies:
```swift
.package(url: "https://github.com/hughbe/OfficeFormReader", from: "1.0.0"),
``````swift
import CompoundFileReader
import MsgReaderlet data = Data(contentsOfFile: ".doc")!
let parentFile = try CompoundFile(data: data)
var rootStorage = parentFile.rootStorage
var macros = rootStorage.children["Macros"]!
let form = try UserForm(storage: macros.children["UserForm1"]!)
for site in form.formControl.siteData.sites {
print(site)
}
for control in form.objectData.embeddedControls {
print(control)
}
```