Git Product home page Git Product logo

excel4delphi's Introduction

Excel4Delphi

Read, Write excel 2002/2003 XML (SpreadsheetML / XML Spreadsheet) library.

fork from https://github.com/Avemey/zexmlss

Exchamples

// Creating new workbook
var workBook: TZWorkBook;
...
workBook := TZWorkBook.Create();
try
  workBook.Sheets.Add('My sheet');
  workBook.Sheets[0].ColCount := 10;
  workBook.Sheets[0].RowCount := 10;
  workBook.Sheets[0].CellRef['A', 0].AsString := 'Hello';
  workBook.Sheets[0].RangeRef['A', 0, 'B', 2].Merge();
  workBook.SaveToFile('file.xlsx');
finally
  workBook.Free();
end
// Editing exists workbook
var workBook: TZWorkBook;
...
workBook := TZWorkBook.Create();
try
  workBook.LoadFromFile('file.xlsx');
  workBook.Sheets[0].CellRef['A', 0].AsString := 'Hello';
  workBook.Sheets[0].CellRef['A', 0].FontStyle := [fsBold];
  workBook.SaveToFile('file.xlsx');
finally
  workBook.Free();
end

excel4delphi's People

Contributors

cs-moto avatar konctantin avatar zmotor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

excel4delphi's Issues

Access violation error

Hi,

Thank you for the nice component.

Using Windows 10
Google drive
ONLYOFFICE Desktop Editors version 7.4.0.163 (x64 exe)
Embarcadero Delphi 10.4 Version 27.0.40680.4203

Using the example
32-bit debug build code

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Excel4Delphi, Excel4Delphi.Xml, Excel4Delphi.Stream,
  Vcl.StdCtrls;

procedure TForm1.Button1Click(Sender: TObject);
var
  workBook: TZWorkBook;
begin
  workBook := TZWorkBook.Create(Self);
  try
    workBook.LoadFromFile('file.xlsx');
    workBook.Sheets[0].CellRef['A', 0].AsString := 'Hello'; // error here
    workBook.Sheets[0].CellRef['A', 0].FontStyle := [fsBold];
    workBook.SaveToFile('file.xlsx');
  finally
    workBook.Free();
  end
end;

I get this error

First chance exception at $006C1E9E. Exception class $C0000005 with message 'access violation at 0x006c1e9e: read of address 0x00000000'. Process Test.exe (12712)

Can reproduce

  1. Create file.xlsx using Google sheets then download
  2. Run button click code
  3. Open in OnlyOffice (A1 contains Hello in bold as expected)
  4. Save the file in OnlyOffice
  5. Close OnlyOffice
  6. Run button click code causes the error

Any sugestions?

Refactoring

Steps:

  • Full reimplement read/write system
  • Add code documentation
  • Add wiki pages
  • Implement themes
  • Read/Write color values with themes
  • Read/Write number formats without wrong convertation
  • Add streaming read/write
  • Implement streaming into/from zip

todo: add more

Error to Execute example

workBook := TZWorkBook.Create(); => workBook := TZWorkBook.Create( nil );

Excel4Delphi.pas
function TZSheets.Add(title: string): TZSheet;
add line: FCount := FCount + 1;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.