Page 1 of 1

Drawing issue

Posted: Thu Aug 28, 2014 4:02 pm
by CareAll
Hello,

I have a simple Excel file containing a drawing. With the following code I load and save the file:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
  XLS: TXLSReadWriteII5;
begin
  XLS := TXLSReadWriteII5.Create(Self);
  try
    XLS.Filename := 'Input.xlsx';
    XLS.Read;

    XLS.Filename := 'Output.xlsx';
    XLS.Version := xvExcel2007;
    XLS.Write;
  finally
    FreeAndNil(XLS);
  end;
end;
When I try to open it with Excel, it says the xl/drawings/drawing1.xml is corrupted.
Please take a look at this error, I send you the input and output files via e-mail.

Re: Drawing issue

Posted: Thu Aug 28, 2014 8:27 pm
by larsa
Hello

I Could not reproduce this. Your Output did not give any error when opened in excel.

Re: Drawing issue

Posted: Wed Sep 10, 2014 4:45 am
by Shovey
I actually encountered this same issue.
If I insert a picture into an excel file and save it.
I then use XLSReadWriteII to write some data to a sheet and then save.

This all works fine.
When I open the new file using Excel I get this error.

"We found a problem with some content in 'xxxx.xlsx' Do you want us to try to recover as much as we can?
If I click yet it gives another popup saying.
Repaired Records: Drawing from /xl/drawings/drawing3.xml part (Drawing Shape)

If I close the window everything appears to be fine. The picture still exists as well as the data that I wrote from XLSReadWrite.

Below is the Error log

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error067400_02.xml</logFileName><summary>Errors were detected in file 'D:\xx\Report 09 Sep 2014.xlsx'</summary>-<repairedRecords summary="Following is a list of repairs:"><repairedRecord>Repaired Records: Drawing from /xl/drawings/drawing3.xml part (Drawing shape)</repairedRecord></repairedRecords></recoveryLog>

Re: Drawing issue

Posted: Wed Sep 10, 2014 5:01 am
by Shovey
I should add that I am using borland builder c++ XE5
with XLSSpreadsheet V2.00.02.
I have confirmed that the XLSReadWriteII5 is version 5.20.30