ggreen86 / XLSX-Workbook-Class

VFP Class to Create an XLSX Workbook without Excel Automation or Installed
45 stars 14 forks source link

Debug Mode when Opening Workbook #54

Open GerhardSc opened 3 years ago

GerhardSc commented 3 years ago

Hello Greg, I try to fill cells in a predefined workbook. But when trying to open the workbook the debugger comes up in line 186 of OpenxlsxWorkbook. lcRelType has the value "person". lcShState is empty.

I unzipped the XLSX and looked into the files and found in xl\rels\woorkbook.xml.rels a line

Relationship Target="persons/person.xml" Type="http://schemas.microsoft.com/office/2017/10/relationships/person" Id="rId5"/<. When I tried to browse "http://schemas.microsoft.com/office/2017/10/relationships/person" I get >The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.< Every other Relationship targets have "officeDocument/2006/relationships" instead of office/2017/10/.

Could this be the reason for my problem?

I use version R32 and R33 beta 8 with the same results.

TIA Gerhard Schmidbauer

ggreen86 commented 3 years ago

That relationship type is not defined in the ECMA Office Open XML File Formats document, version 4; hence, the issue with not handling that relationship type. From the URL above it appears that you are using Office 2017 or later to create the spreadsheet and it is adding this relationship type to the workbook. Please send me a sample of the spreadsheet so that I can look at it -- but right now my time is limited so I don't know when I might have a solution.

GerhardSc commented 3 years ago

Thank you Greg!

Please see my answer on Foxite.com.

I will report back as soon as I have an answer from my customer.

ggreen86 commented 3 years ago

Gerhard--

I understand that you cannot send the file as a sample. However, can you open the xlsx file as an archive (such as with WinZip) and send me a screen shot of the file contents showing the file names and relative paths? I can possibly use this to store this relationship type and then restore when saving the changes.

Thank you.

Greg

GerhardSc commented 3 years ago

Hi Greg,

I attach xl_rels\workbook.xml.rels as rels.txt. rels.txt

HTH Please let me know if you need more / something else.

Gerhard