Skip to content

Access violation error #3

@HugoP

Description

@HugoP

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions