'. "错误-6ren"> '. "错误-我正在使用 LinqToExcel Nuget 包来读取 excel 文件。 下面是我的代码 var excelFile = new ExcelQueryFactory("De-6ren">
gpt4 book ai didi

c# - 获取 "Could not find an implementation of the query pattern for source type ' ExcelQueryable'. "错误

转载 作者:太空宇宙 更新时间:2023-11-03 14:58:36 25 4
gpt4 key购买 nike

我正在使用 LinqToExcel Nuget 包来读取 excel 文件。

下面是我的代码

            var excelFile = new ExcelQueryFactory("DeployQueues");

var tableData = from z in excelFile.Worksheet<AllQueues>("Data")
select z;

但我遇到以下编译器错误。

Could not find an implementation of the query pattern for source type 
'ExcelQueryable<AllQueues>

class for AllQueues

public class AllQueues
{
[ExcelColumn("Company Title")]
public string Name { get; set; }

[ExcelColumn("Providence")]
public string State { get; set; }

[ExcelColumn("Employee Count")]
public string Employees { get; set; }

}

最佳答案

添加引用 Remotion.Data.Linq.dll。你可以在 Nuget 中找到它;

https://staging.nuget.org/packages/Remotion.Data.Linq/

关于c# - 获取 "Could not find an implementation of the query pattern for source type ' ExcelQueryable<T >'. "错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47535678/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com