[ itf @ 07.08.2006. 08:24 ] @
U BCB-u radim program sa jednim složenim izvještajom koji treba da se ispiše u Word i Excel formatu. Za Word sam već napravio, no nemam nikakve primjere za Excel na osnovu kojih bi mogao vidjeti koji je princip rada. Ima itko kakve linkove za rad sa TWordDokument i Excel klasama u BCB-u 6? Ono što je u primjerima nije dovoljno. Hvala
[ surferxyz @ 07.08.2006. 09:24 ] @
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;
[ itf @ 07.08.2006. 09:36 ] @
To je sve za Delphi. Meni treba za BCB 6 primjeri za rad sa klasama: TExcelApplication, TExcelWorkBook, TExcelWorkSheet itd..
[ surferxyz @ 07.08.2006. 12:33 ] @
Dobro ako ti tako kažeš.

Ja ću onda da izbacim ovu kontrolu iz svih projekata, jer radi SAMO u Delphiju, a ja ne koristim Delphi.
[ itf @ 07.08.2006. 12:36 ] @
Gle, ja razumijem da je to vjerovatno COM pa da svugdje radi, no ne želim sad instalirati nove komponente kad već ove imam.
[ kiklop74 @ 07.08.2006. 16:02 ] @
Citat:
itf: Gle, ja razumijem da je to vjerovatno COM pa da svugdje radi, no ne želim sad instalirati nove komponente kad već ove imam.


99% delphi komponenti radi u BCB bez ikakvih problema. Sam BCB je i napravljen sa namerom da upotrebljava sve sto ide za delphi.

[ itf @ 08.08.2006. 07:47 ] @
Citat:
kiklop74: 99% delphi komponenti radi u BCB bez ikakvih problema. Sam BCB je i napravljen sa namerom da upotrebljava sve sto ide za delphi.

Ma da budem iskren tak mi je svejedno za te komponente. Ne kanim sad prelaziti na nešto drugo kad sam ovo već djelomično naučio.