Giter Club home page Giter Club logo

excelprovider's People

Contributors

bruinbrown avatar caringdev avatar chris-b1 avatar chrsteinert avatar dsyme avatar forki avatar fsgit avatar fsprojectsgit avatar goswinr avatar ingted avatar jayhill avatar johndoekyrgyz avatar lewandp1 avatar matthid avatar ntr avatar palpha avatar pbbwfc avatar plainionist avatar quintusm avatar rchybicki avatar sergey-tihon avatar theprash avatar wallacekelly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

excelprovider's Issues

Empty rows after data get read anyway

Description

I have an excel file with five rows (including headers).
When reading it with the ExcelProvider, I get one extra empty row. Is this the expected behavior?

Repro steps

  1. Get the excel file

  2. Run the following FSharp script:

#r @"..\packages\ExcelProvider.0.8.1\lib\ExcelProvider.dll"

open FSharp.ExcelProvider

[<Literal>]
let excelFilePath = "TestBook.xlsx"

type ExcelWorkbook = ExcelFile<excelFilePath>

let source = new ExcelWorkbook()

source.Data 
    |> Seq.iter (fun row -> printfn "%A" row)

Expected behavior

I expected the data to only include the rows with actual data on them.

Actual behavior

When printing the rows, I see one extra row which is empty.

Related information

  • Windows 7 (x64)
  • Excel Provider 0.8.1

Cannot refresh intellisense to changes in excel file

Description

Intellisense for a fsx file shows error after changing column names in excel template file.

Repro steps

Create an Excel template file with columns A and B called test.xlsx. Reference the type provider dll in an fsx file. Create the types using the text.xlsx. Write some code using columns A and B

  1. Step A

Change column B to C in the excel file.

  1. Step B

Change the naming of column B to C in the fsx file. Intellisense shows and error for using column C. However, the code can be loaded to the fsi without problems. The only way to be able to correct the intellisense problem is by renaming the test.xlsx to for example test1.xlsx and use that file.

Expected behavior

Intellisense adjusts to the new column C.

Actual behavior

Intellisense keeps refering to column B.

Known workarounds

Renaming the template file and using that as type provider.

Related information

  • Windows 7
  • .NET 4

Custom ranges

I'd like to be able to select a range of cells from a fixed top-left and supply the right-most column, but not the number of rows e.g.

Instead of A2:B99 I would like to be able to simply do A2:B and get all cells until the end of the table. Is this possible?

unable to open .xlsm files, macro enabled?

Description

Please provide a succinct description of your issue.

Repro steps

type ef = ExcelFile<"c:\a\Main1.xls", HasHeaders=false> // ok
// but not for .xlsm files

  • Operating system = windows 7
  • Branch
  • .NET Runtime, CoreCLR or Mono Version = .NETFramework,Version=v4.6.1

You can only use this provider with an absolute path for the excel file??

Description

When the path of the Excel file is relative. This will not work when moving the compiled code to a different location. The path will still be the absolute path of the original coding location.

Repro steps

Please provide the steps required to reproduce the problem

  1. Create a type with the type provider on a D disk

  2. Try to run the compiled code on a C disk

Expected behavior

If the path for the type is the same relative to the working directory, it should be found.

Actual behavior

The error you can observe is:

System.TypeInitializationException: The type initializer for 'MyTypeProvider' threw an exception.
---> System.TypeInitializationException: The type initializer for '<StartupCode$BlahBlah>.$Blah' threw an exception.
---> System.Exception: Could not open file 'D:\Development\MyExcel.xlsx'. DirectoryNotFoundException

The path that will be shown in the error message is the exact absolute path that was used when compiling the code.

Known workarounds

Using SOURCE_DIRECTORY to create an absolute path gives the same result.

Effectively, this typeprovider can only moved to a location with the same exact absolute path! Meaning I would have to reconfigure a production machine with a D disk just to run this code??

Related information

N/A

How do I use it with VS2012 and Mono?

Is there a F# 3.1, assembly version 4.3.1.0 somewhere that is usable? I installed v4.3.1.0 for VS2013 and got the DLL installed, referencing that still gives problems.

And or, how do I make it work in any way possible?

Support for ranges specified at runtime

I'd like the ability to determine the range at runtime.

I have several files I need to import that contain "bands" of information on the same worksheet. Thus, the range I need to parse moves depending on how much information is in the band above it.

I have code in place to figure out where those ranges are, but don't have a way to specify them when I open the file via the type provider.

At present, I'm sticking with a terrible OleDB-based solution.

Assembly named ExcelProvider.RunTime instead of ExcelProvider

Description

The assembly from the nuget package is named ExcelProvider.Runtime.dll, which disagrees with the current documentation, and seems accidental/odd. Either the docs need to be updated (see issue #64) or the name is incorrect. I presume the name is incorrect, but I didn't want to touch anything before confirming what the expected behavior was.

Repro steps

Please provide the steps required to reproduce the problem

Install the nuget package via paket
Packages folder contains ExcelProvider/lib/net45/ExcelProvider.Runtime.dll

Expected behavior

Based on the current documentation and project name, I would expect the dll to be named ExcelProvider.dll

Actual behavior

dll is named ExcelProvider.Runtime.dll

Known workarounds

Use #r "somePath/ExcelProvider/lib/net45/ExcelProvider.Runtime.dll" instead of what the docs suggest.

Related information

Problems with FSharp.Core versioning when building with Build.cmd

The Tests are failing because of FSharp.Core referencing and deployment issues.

  • ExcelProvider references 4.3.1.0
  • ExcelProvider.Tests references 4.4.1.0
  • FSharp.Core deployed is 4.3.1.0

After reading among other things the issue dotnet/fsharp#2399 and not finding a solution, I tried to go around the problem and upgraded the project to 4.4.1.0, but then...

  • ExcelProvider references 4.4.1.0
  • ExcelProvider.Tests references 4.4.1.0
  • FSharp.Core deployed is 4.4.0.0

Correlation is not causation but I have noticed that the only two versions of FSharp.Core that are installed in GAC is v4.0_4.3.1.0 and v4.0_4.4.0.0.

If I manually copy the FSharp.Core 4.4.1.0 the tests run fine of course.

Multiple worksheets don't show up

If I reference an xslx file with multiple worksheets, it always shows the first sheet, even if I override it with a specific worksheet name in the type constructor.

Wrong output path

In ExcelProvider.fsproj, the tag is \bin\Debug instead of bin\Debug. i.e., there's a leading \ that probably shouldn't be there. When you compile in debug mode, it writes the output to C:\bin\Debug.

Feature request: more flexible headers

Description

Enable more flexibility to declaring headers. Currently header can only be the first row in a selected range.

Frequently headers will span 2 or more cells in a column.
Sometimes headers are followed by a blank, or otherwise useless row. Including this row in selection range breaks column type inference.

Expected behavior

  1. allow skipping one or more rows in a range after the header, such that type inference only takes place on remaining cells in column

  2. allow for merging 2 or more contiguous cells in a column to be the column header

Actual behavior

Currently header can only be the first row in a selected range.

Known workarounds

  1. alter the spreadsheet
  2. use range without headers

InvalidCastException if some of cells in string column are numeric

Occurs if enumerate all rows. As a workaround i have selected the entire column and set format to text

System.InvalidCastException: Unable to cast object of type 'System.Double' to type 'System.String'.
at [email protected](Row x) in my.fsx:line 245
at [email protected](b& )
at Microsoft.FSharp.Collections.IEnumerator.MapEnumerator1.System-Collections-IEnumerator-MoveNext() at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable1 source)
at <StartupCode$FSI_0073>.$FSI_0073.main@()
Stopped due to error

Cannot load ExcelDataReader

Description

未能加载文件或程序集“ExcelDataReader, Version=3.4.1.0, Culture=neutral, PublicKeyToken=93517dbe6a4012fa”或它的某一个依赖项。系统找不到指定的文件。

Related information

  • Operating system: Windows 10 18334
  • Branch: 1.0.1, 1.0.0, 0.9.1
  • .NET CORE 2.2
  • FSharp.Core 4.6
  • TargetFramework: net471
    Platforms: x86

Build.fsx fails on build step with error

Description

If you check out the repo on a windows 10 machine and attempt to build it by running build.cmd the build fails after downloading dotnet sdk 2.1.401 and attempting to unzip it.

Repro steps

Please provide the steps required to reproduce the problem

  1. Step A
    Clone the repository to local windows 10 machine with Visual Studio and/or Visual Code installed

  2. Step B
    Attempt to build by running build.cmd on the command line

Expected behavior

The system should build successfully

Actual behavior

The system fails to build. It attempts to download sdk 2.1.401 and then to unzip it. Failure message copied below :
Downloading 'https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-dev-win-x64.2.1.401.zip' to 'C:\Users\aaa\AppData\Local\Temp\dotnet-dev-win-x64.2.1.401.zip'
Running build failed.
Error:
ICSharpCode.SharpZipLib.Zip.ZipException: Cannot find central directory
at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(String name)
at Fake.ZipHelper.Unzip(String target, String fileName) in D:\code\fake\src\app\FakeLib\ZipHelper.fs:line 89
at Fake.DotNetCli.InstallDotNetSDK(String sdkVersion) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 567
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value() at [email protected](BuildParams p) at Fake.DotNetCli.Build(FSharpFunc2 setBuildParams) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 203
at [email protected](Unit _arg6)
at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626


Build Time Report

Target Duration


Clean 00:00:00.0042845
AssemblyInfo 00:00:00.0784046
Build Failure
Total: 00:00:01.2714281

Status: Failure


  1. ICSharpCode.SharpZipLib.Zip.ZipException: Cannot find central directory
    at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
    at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(String name)
    at Fake.ZipHelper.Unzip(String target, String fileName) in D:\code\fake\src\app\FakeLib\ZipHelper.fs:line 89
    at Fake.DotNetCli.InstallDotNetSDK(String sdkVersion) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 567
    at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
    at System.Lazy1.get_Value() at [email protected](BuildParams p) at Fake.DotNetCli.Build(FSharpFunc2 setBuildParams) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 203
    at [email protected](Unit _arg6)
    at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626

Known workarounds

No known workarounds at this time

Related information

  • Operating system
  • Branch
  • .NET Runtime, CoreCLR or Mono Version
  • Performance information, links to performance testing scripts

When a sheetname isn't found, the type provider defaults to a non-deterministic first sheet with a different name

Description

In an Excel file with Sheet1, Sheet2, Sheet3, assuming each has a different type, and assuming the sheetname is given as an argument to the constructor: if the given sheetname is not found at runtime, it is silently ignored and the internally first sheet is used instead.

Note that the "first sheet" is the first you've created. When you move sheets to the right in Excel, the display order changes, but not the internal index of the sheet. The type provider will select the first sheet by index when the sheetname is not found.

Repro steps

  1. Create an Excel sheet with three different types.
  2. Create some code to read these and to specify the sheetname dynamically
  3. Delete a sheet that isn't the first sheet

Expected behavior

Either an error or an empty set.

Actual behavior

The type provider takes the first sheet that's programmatically (i.e., inside the XML) the first sheet by index. If this type doesn't match, an error will occur. If the type does match, this can lead to unpredictable behavior, like the same sheet being read twice.

Known workarounds

I've researched this with my colleagues but couldn't find a workaround.

Some semblance of a workaround can be created by using the cell-gettors (the dynamic properties from the type provider) and inspect whether the result gives null, in which case either the sheet is empty, the column is absent, or the wrong sheet is loaded.

Related information

Observed with the most recent version of this repo.

When I debug this and inspect the internal fields, you can see that, upon instantiation of the type provider, the internal sheetname is set to the one provided in the constructor. However, the actual data can be something totally different and from a different sheet, because it can silently take the first-sheet-by-index.

no public type provider classes were found

I get the following:

Referenced assembly 'C:...\packages\ExcelProvider.0.1.0\lib\net40\ExcelProvider.dll' has assembly level attribute 'Microsoft.FSharp.Core.ComplierServices.TypeProviderAssemblyAttribute' but no public type provider classes were found

This error is generated by:

'''

r @"C:...\packages\ExcelProvider.0.1.0\lib\net40\ExcelProvider.dll"

'''

could you point me in the right direction fixing this?
Thank you

Btw, what is the difference between the ExcelProvider and FSharpx.TypeProviders.Excel ?

Selection specific sheet doesn't work

Hi,
Selecting specific sheet from *.xlsx file doesn't work.
image

When I access first spreadsheet in the same file it works

type Sheet1 = ExcelFile< @"..\FileStorage\test.xlsx", "Sheet1">
//or
//type Sheet = ExcelFile< @"..\FileStorage\test.xlsx">

Sample documentation missing for handling DBNull

The sample code I took from the documentation works fine until I have an empty cell.

let valueA = row.ColumnA

This then throws System.InvalidCastException
An unhandled exception of type 'System.InvalidCastException' occurred in sample.exe
Additional information: Unable to cast object of type 'System.DBNull' to type 'System.String'.

What is the recommended way to deal with this? I could catch the exception but this isn't very nice code?

let mutable valueA = Unchecked.defaultof<string>
    try
        valueA <- row.ColumnA
    with ex -> 
        valueA <- String.Empty

Thank you.

Access to range defined by a Table Name

Hi,

thank you for the library. It's very useful.
I'm using a lot of Structured References (also called "Table Name") in my Excel Sheets for different reasons.

In VBA, I can access these ranges by its name like any range.
For example, a table défined by the range "A1:B5" named "MyRange" can be accessed both ways : range("A1:B5") or range("MyRange").

It's interesting when you have different tables in the same sheets and when their ranges are not know a priori.

Is it possible to do it the same way through the "range" attribute of your method ?

thanks a lot.

Regards

cannot find designtime dll

Description

With the change to version 1.0.x the F# interactive is not able to find the designtime dll. It searches in the lib directory while it should be looking in the typeproviders directory,

Repro steps

Reference the runtime dll and open FSharp.Interop.Excel . The fsi will be complaining about the TypeProviderAssembly attribute refering to a designtime dll.

Expected behavior

Automatic resolving of path to designtime dll

Actual behavior

Cannot find designtime dll.

Known workarounds

Copy content of typeproviders directory to lib directory.

Related

Maybe is possible to amend the
[<TypeProviderAssembly("ExcelProvider.DesignTime.dll")>]
statement in ExcelProvider.Runtime.fs

Add optional sheetName instance constructor parameter

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)))

Feature Request: Parameter to expose textual forms of formulas in sheet.

I'm currently in a scenario where I'm trying to read the raw text of a formula and parse out a bit of info from it (which is less than ideal, but it's what I've got to work with. Parsing out image urls from a Google sheet downloaded in XLSX form because CSV never provides them, but some data is only stored on there within image formulas so it displays on sheets).

Currently, ExcelProvider only gives me completely blank fields in those particular cases.

It would be nice if in the type definition we can specify that we want to see the textual form of formulas instead of returning blank. Not asking for evaluation or anything of the sort; just the formula itself.

Cannot load excel file at runtime

Description

I can't find a way to load an excel file at runtime. I can only use the one specified as a constant in the type provider initialization

Repro steps

There are no steps to reproduce this problem.

Expected behavior

I expect to use the the constant file as a "template" and then be able to specify at runtime which file to parse, which will need to have the same structure of the template. Withtout this possibility the type provider is useless in real applications.

Actual behavior

I can only load and parse the file I provide as a constant string in the type provider initialization. In other type providers I have used there is a "Load" method to call with a path parameter to specify a different file.

Known workarounds

No workarounds found.

Live published documentation is out of date

Description

The documentation as published at is out of date as of version 1. It is still referring to the old Fsharp.ExcelProvider namespace

Repro steps

Visit the website at and subpages

Expected behavior

The documentation should refer to opening Fsharp.Interop.Excel instead

The required changes seem to have already been made in the docs subfolder of the code. However, the generated documentation has not yet been published to the live site.

Support .NET Standard

Description

I would like to use this package on a .NET Standard library.

Repro steps

  1. dotnet add MyProject.csproj package ExcelProvider

Expected behavior

ExcelProvider to be installed on project

Actual behavior

PS C:\Users\diego\projects\core> dotnet add .\Core\Core.fsproj package ExcelProvider
Microsoft (R) Build Engine version 15.1.545.13942
Copyright (C) Microsoft Corporation. All rights reserved.

  Writing C:\Users\diego\AppData\Local\Temp\tmp81DD.tmp
info : Adding PackageReference for package 'ExcelProvider' into project '.\Core\Core.fsproj'.
log  : Restoring packages for C:\Users\diego\projects\core\Core\Core.fsproj...
info :   CACHE https://api.nuget.org/v3-flatcontainer/excelprovider/index.json
info :   CACHE https://api.nuget.org/v3-flatcontainer/excelprovider/0.8.1/excelprovider.0.8.1.nupkg
error: Package ExcelProvider 0.8.1 is not compatible with netstandard1.6 (.NETStandard,Version=v1.6). Package ExcelProvider 0.8.1 supports: net (.NETFramework,Version=v0.0)
error: One or more packages are incompatible with .NETStandard,Version=v1.6.
error: Package 'ExcelProvider' is incompatible with 'all' frameworks in project '.\Core\Core.fsproj'.

Known workarounds

None

Related information

.NET Command Line Tools (1.0.0-rc4-004777)

Product Information:
 Version:            1.0.0-rc4-004777
 Commit SHA-1 hash:  18c01886cd

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.0-rc4-004777

openWorkbookView not checking reader status

I have just been checking out the Excel Type Provider, and my initial attempt to link to an Excel file generates a null reference error (red squiggly with "Object reference not set to..."). Looking at the type provider code, it appears that files are opened by the openWorkbookView function, which in turn relies on readers provided by the ExcelDataReaders project. These readers apparently do not throw exceptions when there is a problem reading; instead, they set IsValid to false and provide an ExceptionMessage describing the error. I believe openWorkbookView should check if the reader IsValid before proceeding, and (presumably) throw an exception with ExceptionMessage if it is not. Hopefully, this will provide somewhat more helpful information about the nature of the problem in a case like mine.

System.Text.Encoding.CodePages dependency error in docker container

Description

I have prepared a sample app which I can run successfully, but once I try to build a linux docker container using the provided Dockerfile I get the following error:

/src/Program.fs(3,22): error FS3033: The type provider 'FSharp.Interop.Excel.ExcelProvider.ProviderImplementation+ExcelProvider' reported an error: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621) [/src/ConsoleApp.fsproj]

Repro steps

ConsoleApp.zip
Extract the project and try to build a linux docker container using the provided Dockerfile.

Expected behavior

Successfully build the project inside the docker container.

Actual behavior

Docker build fails with error:

/src/Program.fs(3,22): error FS3033: The type provider 'FSharp.Interop.Excel.ExcelProvider.ProviderImplementation+ExcelProvider' reported an error: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621) [/src/ConsoleApp.fsproj]

Unable to use ExcelProvider on VisualStudio for Mac (Mono framework)

Description

Program.fs(22,22): Error FS3033: The type provider 'ExcelProvider.ExcelProvider+ExcelProvider' reported an error: Could not create ExcelDataReader. Exception - Could not create ExcelDataReader. Exception - Method 'ICSharpCode.SharpZipLib.Zip.ZipEntry.IsCompressionMethodSupported' not found. (FS3033)

Repro steps

  1. Make a new project
  2. Add a template xlsx file
  3. Try using the ExcelProvider using type TemplateExcel = ExcelFile<"TemplateType.xlsx">
  4. Read the error messages

Expected behavior

  • Should be able to build

Actual behavior

  • Error while building

Known workarounds

None that I could find out
Tried various versions of ExcelProvider ranging from 0.1.2 to 0.8.0
Please provide a description of any known workarounds.

Related information

  • Operating system - Macintosh
  • .NET Runtime, CoreCLR or Mono Version - Visual Studio for Mac (Mono framework)

Implement ability to load data via a Stream

Description

I'd like to be able to load data from a System.IO.Stream

For context, I am trying to load data while running inside an Azure Function with a BlobStorage trigger. At that point, I have access to the data I need in the form of a stream.

The workaround (I think) is to write the data out to temp storage and then read it back in using the facility provided (i.e. by providing the file path). If an overload can take a stream, then the workaround is unnecessary.

Allow do define custom schema for column types

It looks like at the current state ExcelProvider<> supports a very limited set of data types, namely float, bool, DateTime (which sometimes is not recognized correctly) and string.

This issue brings two things:

  1. Support more types, at least double, decimal, int, int64 and options. Excels are often used in fields, where float precision is far to weak.
  2. Idea borrowed from a CsvProvider, which allows to define additional Schema property where types of columns can be specified manually (I found some cases where Date column is treated as float). It doesn't have to be as advanced as in CsvProvider, but something like date,string, string, int option, decimal would be a great relief.

Feature request: override schema definition

Description

Frequently the column types inferred by the TP are wrong. Implement a schema definition parameter, similar to how CSV TP does. The ability to override only selected columns in the range would be preferred.

Known workarounds

ForceString

Full CRUD

It would be wonderful if this provider could achieve full CRUD (Create, Read, Update, Delete) on an Excel table. Currently I am using this for reading and OpenXML SDK for writing.

Support for option types?

Description

I can't find any support for optional data within the TP - so I'm forced to fall back to working with strings and then converting to e.g. floats.

Have I missed something?

Culture Info setting

Is there any way (or plans) to allow setting Globalization settings when reading sheets? If you use ForceString = true, it appears to return the data in the OS culture, rather than the current culture of the app domain that's been set. This causes problems downstream if you then do any parsing operations.

Header Row skipped in .xls file

I have an XLS file. Properties for this are shown as the values of the second row rather than the first row (which contains headers).
If I save the file as a XLSX then the headers are correctly used.

no public type provider classes were found ( when hosted)

I get this error with script files on .NET Framework (not Core).
I use the FSharp Compiler Service with my own WPF editor. As a standalone Editor App the type provider works fine. All good.

But when I host my F# Editor and FCS inside my CAD app (Rhinoceros3D) I get this error message.
The same error is shown in by the FsChecker as well as by FSharp Interactive.

What is different in the hosted context that would trigger this error ? Can I fix this or does this require changes to the type provider ? other Type providers such as FSharp.Data work fine in the hosted context.

I am using FCS 23.0.3

ExcelProvider.0.8.2\lib\ExcelProvider.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found

Build.cmd fails with FS2026 on Windows with VS16.4

Description

Build.cmd fails with error FS2026 on windows if run after checkout

Repro steps

  1. Step A

Check out the repository onto a Windows machine with Visual Studio 16.4 installed

  1. Step B

Attempt to run build with command "./build.cmd" from command line with Administrator Privileges

Expected behavior

Expect the libraries to be built successfully.

Actual behavior

The build process fails with the following error messages

FSC : error FS2026: Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded) [C:\repos\quintusm\ExcelProvider\src\ExcelProvider.DesignTime\ExcelProvider.DesignTime.fsproj]
FSC : error FS2026: Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded) [C:\repos\quintusm\ExcelProvider\src\ExcelProvider.DesignTime\ExcelProvider.DesignTime.fsproj]
FSC : error FS2026: Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded) [C:\repos\quintusm\ExcelProvider\src\ExcelProvider.DesignTime\ExcelProvider.DesignTime.fsproj]

Known workarounds

Not currently aware of any workarounds

Related information

  • Microsoft Windows [Version 10.0.18363.535]
  • Current master branch

Is this meant to work with dotnet core? (System.Text.Encoding.CodePages dependency error)

I'm new to F# so this may well be user error...

Description

I get the following error when trying to run a simple solution:

error FS3033: The type provider 'FSharp.Interop.Excel.ExcelProvider.ProviderImplementation+ExcelProvider' reported an error: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Could not find or load a specific file.

I was going to log as an issue but I'm not sure whether the ExcelProvider is actually meant to work on .net core yet?

Known workarounds

Use full framework? Code works fine when running from .fsx, and intellisense (Ionide in vscode) is working correctly at design time.

Related information

  • Using ExcelProvider 1.0.1.
  • Tried with dotnet SDK versions 2.2.202 and 3.0.100-preview3-010431.
  • Tried specifying TargetFramework of netcoreapp2.1 and netcoreapp3.0 respectively in .fsproj.
  • Tried manually referencing System.Text.Encoding.CodePages in solutions using both the dotnet add package ... and paket add ... with local /packages folder approaches.

Make the tests work

Run "build.cmd Release"

==> all tests fail with "MethodNotFoundException"

Use FSharp.TypeProviders.SDK

Description

Currently the project uses a version of FSharp.TypeProviders.StarterPack which seems to not have correct redirecting of FSharp.Core references to the one used by the compiling project.

Repro steps

If you have latest F# tools installed which uses an FSharp.Core with assembly version 4.4.3.0, the TP currently generates a reference to that, even if the project itself references a lower version.

Expected behavior

FSharp.Core assembly references redirected to the one used by the compiling project. This should be handled correctly by current implementation in FSharp.TypeProviders.SDK.

Actual behavior

Failing to find FSharp.Core version 4.4.3.0 at runtime although the project was not referencing it.

Known workarounds

Update project to use latest FSharp.Core. Add downwards assembly redirects to app/web.config.

Related information

  • Operating system: Windows
  • NuGet release: ExcelProvider 0.8.2

Feature request: read more rows to infer column type

Description

I don't know how many rows the TP reads before attempting to infer column types, but it is not enough. Type inference is frequently incorrect because the TP did not recognize (for instance) that a blank cell appears in the column, which should render it an option type, or that a decimal number appears further down a column, and so the type should not be int.

Conduct some experiments to come up with a greater number of rows consumed to do type inference, but not so many it impacts performance too much. More rows is better.

Known workarounds

ForceString - not a nice alternative

Clean up trailing whitespace

The trailing whitespace makes diffs quite hard to read (lots of red blocks). I'd be happy to do it, but I'd end up having "contributed" a lot more than is fair. Also, not everyone cares about code sanity like I do, so I'll defer to your judgement :).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.