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] Error reading file with table with no header row #44

Open
Freymaurer opened this issue Jul 25, 2023 · 0 comments
Open

[BUG] Error reading file with table with no header row #44

Freymaurer opened this issue Jul 25, 2023 · 0 comments
Assignees
Labels
Type: Bug Something is not working, and it is confirmed by maintainers to be a bug.

Comments

@Freymaurer
Copy link
Collaborator

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

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.IndexOutOfRangeException: Index was outside the bounds of the array.
   at FsSpreadsheet.ExcelIO.Table.Area.toBoundaries(StringValue area)
   at FsSpreadsheet.ExcelIO.FsExtensions.FsTable.fromXlsxTable.Static(Table table)
   at FsSpreadsheet.ExcelIO.FsExtensions.sheets@186.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 131
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 113
   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 911
   at FsSpreadsheet.ExcelIO.FsExtensions.FsWorkbook.fromXlsxFile.Static(String filePath)
   at <StartupCode$FSI_0004>.$FSI_0004.main@() in c:\Users\Kevin\Desktop\test.fsx:line 10
   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
>

Book1.xlsx

@Freymaurer Freymaurer added the bug Something isn't working label Jul 25, 2023
@Freymaurer Freymaurer changed the title [BUG] Error reading file [BUG] Error reading file with headerless table Jul 25, 2023
@HLWeil HLWeil changed the title [BUG] Error reading file with headerless table [BUG] Error reading file with table with no header row Jul 25, 2023
@omaus omaus self-assigned this Jul 25, 2023
HLWeil added a commit that referenced this issue Jul 25, 2023
@HLWeil HLWeil assigned HLWeil and unassigned omaus Jul 25, 2023
@kMutagene kMutagene added Type: Bug Something is not working, and it is confirmed by maintainers to be a bug. and removed bug Something isn't working labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something is not working, and it is confirmed by maintainers to be a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants