Skip to content

hughbe/OfficeFormReader

Repository files navigation

OfficeFormReader

Swift definitions for structures, enumerations and functions defined in MS-OFORMS.

Example Usage

Add the following line to your project's SwiftPM dependencies:

.package(url: "https://github.com/hughbe/OfficeFormReader", from: "1.0.0"),
import CompoundFileReader
import MsgReader

let data = Data(contentsOfFile: "<path-to-file>.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)
}

About

Swift definitions for structures, enumerations and functions defined in [MS-OFORMS]

Resources

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages