使用Nuget软件包将CSV文件导入C#中的数据表
我的目标是将CSV文件导入数据表或内存,并能够将数据表导出到CSV文件中。对于导入和导出,我正在尝试使用一个名为csvlibraryak.core的掘金软件包,并且由于某些原因,当我使用块块包装创建者提供的语法时,我仍然会遇到错误。错误消息是,“命名空间csvlibraryak.core中不存在类型或名称名称导入。 地方。
任何
using CSVLibraryAK.Core;
using System.Data;
namespace project
{
class Program
{
static void Main(string[] args)
{
bool hasHeader = true;
string importFilePath = "C:\\import.csv";
DataTable data = CSVLibraryAK.Core.Import(importFilePath, hasHeader);
}
}
}
没有到达
My goal is to import a csv file into a data table, or the memory, and to also be able to export a data table into a csv file. For the import and the export, I'm trying to use a nugget package called CSVLibraryAK.Core and for some reason when I used the syntax that was provided by the creator of the nugget package, I still get an error. The error message is that, "the type or namespace name import doesn't exist in the namespace CSVLibraryAK.Core. I've tried to mess around with it and also tried to see if anyone else has encountered the same problem but I'm not getting anywhere.
This is some code that I have tried:
using CSVLibraryAK.Core;
using System.Data;
namespace project
{
class Program
{
static void Main(string[] args)
{
bool hasHeader = true;
string importFilePath = "C:\\import.csv";
DataTable data = CSVLibraryAK.Core.Import(importFilePath, hasHeader);
}
}
}
If anyone could help me out I'd be very grateful
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论