Skip to content

Commit 6987e16

Browse files
authored
Update example code in README.md
1 parent 2593f77 commit 6987e16

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ more sensible naming applied to a few attributes. The API is pretty simple:
3737
```swift
3838
import CoreXLSX
3939

40-
guard let file = XLSXFile(filepath: "./categories.xlsx") else {
41-
fatalError("XLSX file corrupted or does not exist")
40+
let filepath = "./categories.xlsx"
41+
guard let file = XLSXFile(filepath: filepath) else {
42+
fatalError("XLSX file at \(filepath) is corrupted or does not exist")
4243
}
4344

4445
for (worksheetName, path) in try file.parseWorksheetPathsAndNames() {
4546
if let worksheetName = worksheetName {
46-
print("this worksheet has a name: \(worksheetName)")
47+
print("This worksheet has a name: \(worksheetName)")
4748
}
4849

4950
let worksheet = try file.parseWorksheet(at: path)

0 commit comments

Comments
 (0)