gpt4 book ai didi

c# - UWP 中的 DataTable 类在哪里?

转载 作者:太空宇宙 更新时间:2023-11-03 19:55:27 24 4
gpt4 key购买 nike

我知道 WinRT 中缺少 System.Data 命名空间,因此我从未提出过基于 DataTable 或 DataSet 进行 WinRT 编程的希望。现在我在 UWP 中看到了 System.Data(和 System.Data.Common)命名空间,但永远找不到 DataTable 或 DataSet。或者,我是否遗漏了什么,或者需要不同的命名空间?

更具体地说,如果我过去使用过 System.Data.DataTableMicrosoft.Office.Interop.Excel.DataTable,我需要做什么才能迁移UWP 的旧代码?

最佳答案

UWP 中不存在该数据表。您应该考虑使用 EF7 进行数据访问。您将无法从 UWP 应用程序自动执行 excel。 Syncfusion 有一个用于与 excel 交互的 XlsIo 库。

https://ef.readthedocs.org/en/latest/getting-started/uwp.html

http://www.syncfusion.com/products/file-formats/xlsio

查看那里的社区许可证

http://www.syncfusion.com/products/communitylicense

关于c# - UWP 中的 DataTable 类在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34155416/

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