Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

BCB 6 - Word i Excel dokumenti

BCB 6 - Word i Excel dokumenti 07.08.2006. u 09:24 · pre 247 meseci #1
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
Re: BCB 6 - Word i Excel dokumenti 07.08.2006. u 10:24 · pre 247 meseci #2
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;
Re: BCB 6 - Word i Excel dokumenti 07.08.2006. u 10:36 · pre 247 meseci #3
To je sve za Delphi. Meni treba za BCB 6 primjeri za rad sa klasama: TExcelApplication, TExcelWorkBook, TExcelWorkSheet itd..
Re: BCB 6 - Word i Excel dokumenti 07.08.2006. u 13:33 · pre 247 meseci #4
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.
Re: BCB 6 - Word i Excel dokumenti 07.08.2006. u 13:36 · pre 247 meseci #5
Gle, ja razumijem da je to vjerovatno COM pa da svugdje radi, no ne želim sad instalirati nove komponente kad već ove imam.
Re: BCB 6 - Word i Excel dokumenti 07.08.2006. u 17:02 · pre 247 meseci #6
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.

Potpis
Tko leti vrijedi
Re: BCB 6 - Word i Excel dokumenti 08.08.2006. u 08:47 · pre 247 meseci #7
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.
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme