Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file.parseWorksheetPathsAndNames() wanna workbook: <#Workbook#> #113

Closed
sea5kg opened this issue Jun 10, 2020 · 1 comment
Closed

file.parseWorksheetPathsAndNames() wanna workbook: <#Workbook#> #113

sea5kg opened this issue Jun 10, 2020 · 1 comment
Assignees
Labels
bug Something isn't working documentation Documentation improvements

Comments

@sea5kg
Copy link

sea5kg commented Jun 10, 2020

Version

0.11.0

Describe the bug

Copied example code from readme but I have compile errors

To Reproduce
Steps to reproduce the behavior:

  1. copy code from readme
let filepath = "./categories.xlsx"
guard let file = XLSXFile(filepath: filepath) else {
  fatalError("XLSX file at \(filepath) is corrupted or does not exist")
}

for (worksheetName, path) in try file.parseWorksheetPathsAndNames() {
  if let worksheetName = worksheetName {
    print("This worksheet has a name: \(worksheetName)")
  }

  let worksheet = try file.parseWorksheet(at: path)
  for row in worksheet.data?.rows ?? [] {
    for c in row.cells {
      print(c)
    }
  }
}
  1. compile

Expected behavior
Worktable code in readme

@MaxDesiatov MaxDesiatov added the bug Something isn't working label Jun 10, 2020
@MaxDesiatov
Copy link
Collaborator

Hi @sea-kg, thanks for reporting the issue. I apologize for the mistake, the example code in README.md is now fixed in the master branch.

@MaxDesiatov MaxDesiatov added the documentation Documentation improvements label Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Documentation improvements
Projects
None yet
Development

No branches or pull requests

2 participants