Welcome to XLSReadWriteII, the most complete Delphi component for reading and writing Excel files.
XLSReadWriteII is the completely rewritten succeeder of the XLSReadWrite components.
With XLSReadWriteII can you not only access cell values, you can also:
· Edit existing files. Add or delete the cells you want.
· Format cells. Select the same formatting options as in Excel.
· Read and write formulas. You can also calculate the formula in a cell.
· Read & write merged cells.
· Read & write pictures.
· Read & write charts.
· Read & write cell notes.
· Read & write hyperlinks.
· Naitive Delphi components. No extra files or software has to be present.
· And many more things...
XLSReadWriteII works with Delphi 4, 5 and 6.
The XLSReadWriteII package also includes components for:
· Import of any database table.
· Import of HTML tables. It extracts the TABLE tags from the HTML file. Very useful for reading stock quotes or similar data.
· Export to HTML.
XLSReadWriteII is easy to use. Cells are accessed in the same way as a grid. Just use any of the AsXXXCell[Col,Row] functions in order to read or write a cell.
Web site
www.axolot.com
Here is a small example on how to write to some cells. Assuming you have a TXLSReadWriteII component on the form named XLS.
procedure Form1.WriteCells;
begin
// Set the filename.
XLS.Filename := 'Test.xls';
// Insert a string.
XLS.Sheets[0].AsString[0,0] := 'Hello';
// Insert some numbers.
XLS.Sheets[0].AsFloat[2,0] := 10;
XLS.Sheets[0].AsFloat[2,1] := 20;
XLS.Sheets[0].AsFloat[2,2] := 30;
XLS.Sheets[0].AsFloat[2,3] := 40;
// Insert a formula which sums the above values.
XLS.Sheets[0].AsFormula[2,4] := 'SUM(C1:C4)';
// Write the file.
XLS.Write;
end;