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

[BUG] Cannot read file #42

Closed
Freymaurer opened this issue Jul 25, 2023 · 2 comments · Fixed by #43
Closed

[BUG] Cannot read file #42

Freymaurer opened this issue Jul 25, 2023 · 2 comments · Fixed by #43
Labels
bug Something isn't working

Comments

@Freymaurer
Copy link
Collaborator

Tried reading file with FsSpreadsheet.ExcelIO.

#r "nuget: FsSpreadsheet"
#r "nuget: FsSpreadsheet.ExcelIO"

let path = @"C:/Users/Kevin/Desktop/Book1.xlsx"

open FsSpreadsheet
open FsSpreadsheet.ExcelIO

let wb = FsWorkbook.fromXlsxFile(path)

returns:

> let wb = FsWorkbook.fromXlsxFile(path);;
System.InvalidOperationException: Error in implicit conversion. Cannot convert null object.
   at DocumentFormat.OpenXml.BooleanValue.op_Implicit(BooleanValue xmlAttribute)
   at FsSpreadsheet.ExcelIO.FsExtensions.FsTable.fromXlsxTable.Static(Table table)
   at FsSpreadsheet.ExcelIO.FsExtensions.sheets@185.Invoke(Sheet xlsxSheet)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@128.DoMoveNext(b& curr) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 134
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 117
   at Microsoft.FSharp.Collections.SeqModule.Fold[T,TState](FSharpFunc`2 folder, TState state, IEnumerable`1 source) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 914
   at FsSpreadsheet.ExcelIO.FsExtensions.FsWorkbook.fromXlsxFile.Static(String filePath)
   at <StartupCode$FSI_0017>.$FSI_0017.main@() in c:\Users\Kevin\Desktop\test.fsx:line 37
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Stopped due to error

This is the file:
Book1.xlsx

@Freymaurer Freymaurer added the bug Something isn't working label Jul 25, 2023
@HLWeil
Copy link
Member

HLWeil commented Jul 25, 2023

Anyone else looking into this? Otherwise I'll check

@Freymaurer
Copy link
Collaborator Author

Please do!

HLWeil added a commit that referenced this issue Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants