将 Excel 工作表嵌入到表单中
好的,我需要将 Excel 模板文档嵌入到 winform 中(保留所有格式),更改一些值,打印预览它,然后将其打印到 PDF 或打印机。而且我需要在不花老板任何现金的情况下做到这一点。
我尝试嵌入标准的 Excel COM 内容,但 IDE (C# Express 2010) 不喜欢它并且崩溃了(Office 控件似乎没有做太多事情,并且在网络浏览器中访问 XLS 只能偶尔工作)
所以我我猜我正在寻找第三方开源 Excel 控件?
事实上,理论上它可以是任何网格类型的格式,只要我可以进行与 Excel 类似的格式设置,并使其对客户端来说看起来很漂亮。
有什么想法吗?
干杯
OK, I need to embed an Excel template document into a winform (retaining all the formatting), change some values, printpreview it, then print it to either PDF or a printer. And I need to do it without spending any of the boss's cash.
I tried embedding the standard Excel COM stuff, but the IDE (C# Express 2010) didn't like it and crashed (the Office control didn't seem to do much and accessing an XLS in a webbrowser only worked occasionally)
So I'm guessing that I'm looking at a third party open source Excel control?
In fact theoretically it could be any grid-type format as long as I can do similar formatting to Excel and make it look all pretty for the client.
Any ideas?
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 DSOFramer 控件获得所需的功能。这是微软很久很久以前提供的一个小控件,并且已经从他们的网站上退役了。但它仍然工作得很好。您可以从此处下载该控件:
http://download.cnet.com/Microsoft-Developer-Support-Office-Framer-Control-Sample-KB-311765/3000-2206_4-10732960.html
You could get the functionality you want with the DSOFramer control. This was a small control that Microsoft provided long, long time ago, and has since decomissioned from their site. It still works perfectly well, though. You can download the control from here:
http://download.cnet.com/Microsoft-Developer-Support-Office-Framer-Control-Sample-KB-311765/3000-2206_4-10732960.html