无需Excel即可从Delphi导出到Excel
我希望将数据从 Delphi 导出到 Excel,而无需拥有 Excel 副本,这可能吗?
注意 CSV 不行。
I'm looking to export data to excel from Delphi without having to own a copy of excel, is this possible?
N.B. CSV will not do.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
FlexCel 以前是一个开源项目,现在由 TMS 管理 (http://www.tmssoftware.com/site/flexcel .asp)效果很好。
您还可以在 http://www.torry.net 上查看 TmxNativeExcel。免费且使用原生 Biff 格式。不过我还没有尝试过。
FlexCel, earlier an Opensource now managed by TMS (http://www.tmssoftware.com/site/flexcel.asp) works great.
You can also check TmxNativeExcel at http://www.torry.net. Comes free and is uses native Biff format. I've not tried this though.
尝试 zexmlss。该库可以创建和加载 Excel 2003 XML 格式文件。支持合并单元格、边框、垂直和水平对齐等。 Zlib 许可证。使用 delphi 6、7、9-14 和 lazarus。
Try zexmlss. This library can create and load excel 2003 XML format files. Support merged cells, borders, vertical and horizontal alignment and other. Zlib license. Work with delphi 6, 7, 9-14 and lazarus.
我相信可以将 MS Office 文档创建为 HTML。您无需在 Web 浏览器中打开它们,文件仍然可以具有扩展名 .xls 并像平常一样在 Excel 中打开。
我刚刚创建了一个新的电子表格,并将数字 1-3 粘贴到 A 列的前三个单元格中,并将其另存为 HTML。有一堆额外的混乱可能并不完全必要。我尽可能地删除了内容,这看起来是生成工作电子表格的最低限度的内容。
尝试创建一个新的文本文件并将其作为其内容,并使用 .xls 扩展名保存。
I believe it's possible to create MS Office documents as HTML. You don't need to open them in a web browser then or anything, the file can still have the extension .xls and open in Excel like normal.
I just created a new spreadsheet and stuck the numbers 1-3 in the first three cells of column A, and saved it as HTML. There was a bunch of extra mess that probably isn't all necessary. I stripped out as much as I could, here's what looks to be the bare minimum to produce a working spreadsheet.
Try creating a new text file with this as its contents, and save it with a .xls extension.
oExport - XLSX/ODS 原生 Delphi 导入/导出库
http://www.kluug.at/xlsx-ods-delphi.php
根据 MPL/GPL/LGPL 三重许可证获得许可
版本:MPL 1.1/GPL 2.0/LGPL 2.1
oExport - XLSX/ODS native Delphi import/export library
http://www.kluug.at/xlsx-ods-delphi.php
licensed under a MPL/GPL/LGPL tri-license
Version: MPL 1.1/GPL 2.0/LGPL 2.1
Scalabium (scalabium.com) 的 SMExport 包含多种格式,包括安装或未安装 Excel 的 Excel 格式。
SMExport from Scalabium (scalabium.com) includes lots of formats, including Excel format with or without having Excel installed.
前面提到的NativeExcel来自Nika-Soft。不是免费的,但效果很好。我现在使用它已经一年多了,没有任何问题。 http://www.nika-soft.com/nativeexcel2/
NativeExcel mentioned earlier is from Nika-Soft. Not free, but it works fine. I am using it now for over one year without problems. http://www.nika-soft.com/nativeexcel2/
TXLSFile 库 v.4.0。和 XLSExport 组件
我们已成功用于 D2007、D2009 和 XLSExport 组件。 D2010
什么是 TXLSFile
http://sm-software.com
TXLSFile library v.4.0. and XLSExport components
We've used successfully with D2007, D2009 & D2010
What is TXLSFile
http://sm-software.com
有一种非常简单的方法可以实现这一点,那就是使用文本文件。简单地输出数据,每个字段后面跟着一个逗号,后面跟着一个回车符。使用 .CSV 扩展名保存此文件。这在 Excel 上应该仍然有效;我这几天用Open Officew
theree is a very simple way to achive this and is by use of a text file. Simply output the data, each field followed by a comma, followed by a carriage return. Save this file with a .CSV extension. This should still work on Excel; I use Open Officw these days