I'm looking to export data to excel from Delphi without having to own a copy of excel, is this possible?
NB CSV will not do.
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.
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.
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.
<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 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的SMExport( scalabium.com )包含许多格式,包括安装或不安装Excel的Excel格式。
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
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/
We've used successfully with 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.