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

Add optional sheetName instance constructor parameter #29

Open
ntr opened this issue Aug 13, 2016 · 1 comment
Open

Add optional sheetName instance constructor parameter #29

ntr opened this issue Aug 13, 2016 · 1 comment

Comments

@ntr
Copy link
Contributor

ntr commented Aug 13, 2016

Description

I have a file with multiple sheets and they share the same structure. I would like to generate type from the first sheet and after that instantiate my type on each of the sheets. It can be done by adding optional sheetName parameter to instance constructor.

Expected behavior

type MonthlyData = FSharp.ExcelProvider.ExcelFile< @"c:\tmp\x.xlsx", "JAN">
let data =["JAN"; "FEB"; "MAR"] |> List.map (fun x -> MonthlyData(@"c:\tmp\x.xlsx", x)))

@abelbraaksma
Copy link
Member

Not sure why this wasn't closed, but the thing you're requesting here currently works exactly as you've written it: you can provide a 2nd argument to the constructor at runtime to designate the sheetname for your type provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants