我想在没有Excel副本的情况下从Delphi导出数据到Excel,这可能吗?
注意,CSV文件无法满足要求。
我想在没有Excel副本的情况下从Delphi导出数据到Excel,这可能吗?
注意,CSV文件无法满足要求。
FlexCel原先是一个开源项目,现在由TMS (http://www.tmssoftware.com/site/flexcel.asp) 进行管理,它的表现非常出色。
你也可以在 http://www.torry.net 上查看TmxNativeExcel。它是免费的,并使用本地Biff格式,但我尚未尝试过。
试试zexmlss。这个库可以创建和加载excel 2003 XML格式文件,支持合并单元格、边框、垂直和水平对齐等功能。采用Zlib许可证。适用于Delphi 6、7、9-14和Lazarus。
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>Sheet1</x:Name>
<x:WorksheetOptions>
<x:Selected/>
<x:Panes>
<x:Pane>
<x:Number>3</x:Number>
<x:ActiveRow>3</x:ActiveRow>
</x:Pane>
</x:Panes>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml><![endif]-->
</head>
<body>
<table x:str>
<tr>
<td x:num width=64>1</td>
</tr>
<tr>
<td x:num>2</td>
</tr>
<tr>
<td x:num>3</td>
</tr>
</table>
</body>
</html>
oExport - XLSX/ODS原生Delphi导入/导出库
http://www.kluug.at/xlsx-ods-delphi.php
根据MPL/GPL/LGPL三重许可证授权 版本:MPL 1.1/GPL 2.0/LGPL 2.1
我们已成功地在D2007、D2009和D2010上使用过。
TXLSFile is a Delphi library for reading and writing MS Excel
XLS files. It is based on direct reading and writing of files,
and works without OLE Automation with Microsoft Excel.
TXLSFile is distributed with XLSExport components package.
XLSExport is a Delphi components package for quick data
export into MS Excel file with one line of code.
前面提到的NativeExcel来自Nika-Soft。虽然不是免费的,但它运行良好。我已经使用它一年多了,没有出现任何问题。http://www.nika-soft.com/nativeexcel2/
有一种非常简单的方法可以实现这个目标,就是使用文本文件。只需输出数据,每个字段后跟一个逗号,然后是一个回车符。将此文件保存为 .CSV 扩展名。这在 Excel 上仍然有效;我现在使用的是 Open Office。