如何在C#中使用excel输入 [英] How do I use excel inputs in C#

查看:72
本文介绍了如何在C#中使用excel输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



是脚本新手。我想要帮助在C#代码中使用excel输入

例如:名字,姓氏和电话号码是字段名称,我需要在脚本调用时使用一组数据excel

有人可以帮帮我吗?



我尝试过:



我学习selenium webdriver最近一周,因此没有尝试任何解决方案

解决方案

请先阅读我对第一个问题的评论。



如果你想学习如何在Excel / Word中读/写数据,请检查:

如何:使用Visual C#功能访问Office互操作对象(C#编程指南) [ ^ ]

如何:使用COM Interop到C创建一个Excel电子表格(C#) [ ^ ]

从.NET开发人员的角度理解Excel对象模型 [ ^ ]

如何:将文本插入电子表格文档中的单元格(Open XML SDK) [ ^ ]

如何使用Visual C#自动化Excel以使用数组填充或获取范围内的数据 [ ^ ]




我非常建议您使用 EPPlus 。它可以创建和读取Excel文件。我经常使用它,因为它对我来说非常适合。 [ ^ ]

hi,
am new to scripting. I want help in using excel inputs in C# code
For instance: Firstname, Lastname and Phone number are the field names under which i need to be having a set of data to be used while the script is calling excel
can someone help me?

What I have tried:

am learning selenium webdriver for last one week and hence haven't tried any solutions

解决方案

Please, read my comment to th question first.

If you want to learn how to read/write data into Excel/Word, please check this:
How to: Access Office Interop Objects by Using Visual C# Features (C# Programming Guide)[^]
How to: Use COM Interop to Create an Excel Spreadsheet (C#)[^]
Understanding the Excel Object Model from a .NET Developer’s Perspective[^]
How to: Insert text into a cell in a spreadsheet document (Open XML SDK)[^]
How to automate Excel by using Visual C# to fill or to obtain data in a range by using arrays[^]


Hi
I would very much suggest you use the EPPlus plug in. It can create and read Excel files. I use it very regularly as it works perfectly for me. [^]


这篇关于如何在C#中使用excel输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆