Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 excel 中创建了一个 webquery,它从 Excel 文件中的网页中获取数据。无论如何我可以在 C# 中访问相同的 webquery。我希望这是有道理的。需要一些有价值的编码建议。
要了解如何在 Excel 中通过 VBA 访问 Web 查询表,请查看
MSDN 库:QueryTables/Webtable文档
这将为您提供您将在 c# 中使用的对象
例如,Webquery 存储在Excel 应用程序的工作簿中的工作表中的Querytable 对象中。
webquery 有一个显示 URL 的连接对象,一个 WebTables 属性确定哪些表从网页引入到您的工作表。
所以现在你只需要做一些阅读,并编写一些 C# 代码