APD Toronto
asked on
Opening .xlsx files in Windows 7
Hi Experts,
I have a software that generates .xlsx file, but I keep getting "Unreadable content in file.xlsx" and the chart is deleted. If I open the same file on a MAC, no error and the chart is there. I am also reading online that these files can be opened in XP, Vista, and even Windows 8. I cannot confirm that.
I also read that this is a security bug in Windows 7.
Does anyone know how to fix this?
I cannot open the file on another OS, re-save it, then re-opened in Windows 7 because there are a lot of files in a fast pace environment.
Any help will be greatly appreciated
I have a software that generates .xlsx file, but I keep getting "Unreadable content in file.xlsx" and the chart is deleted. If I open the same file on a MAC, no error and the chart is there. I am also reading online that these files can be opened in XP, Vista, and even Windows 8. I cannot confirm that.
I also read that this is a security bug in Windows 7.
Does anyone know how to fix this?
I cannot open the file on another OS, re-save it, then re-opened in Windows 7 because there are a lot of files in a fast pace environment.
Any help will be greatly appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found Default programs and did as you described, but the issue persists.
This is the file that I am trying to open. You will notice the chart on a MAC and probably other Windows OS, but not on Windows 7.
NiagaraPAXreport-5cq0jeijug00o8r18e1jdol
This is the file that I am trying to open. You will notice the chart on a MAC and probably other Windows OS, but not on Windows 7.
NiagaraPAXreport-5cq0jeijug00o8r18e1jdol
ASKER
For some reason EE truncated the extension, but it is .xlsx
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I thought this is an issue with Windows 7 because I can open in other OSs.
No. The other OS's probably have m$ Office installed.
ASKER
m$ Office?
But I tried Office 2010 and 2007 both on Windows 7, same error
But I tried Office 2010 and 2007 both on Windows 7, same error
Maybe it was created with another Office software, for example LibreOffice like I suggested that you use. Those programs can also save their files in using the m$ Office extensions. I opened the file using LibreOffice on my Windows 7 PC, and could read it without problems.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am using PHPEXcel to generate this file, if that helps.
ASKER
Any advice?
Unfortunately PHP scripting is not one of my strengths, but there may be other experts lurking around who are expert in this field.
are you using the latest version from github?
ASKER
I'm using v 1.8.0
ASKER
I downloaded PHPExcel 1.9 from github, the issue persists.
One issue with this file is the drawing object, xl\drawings\drawing1.xml, which seems to be malformed.
Is there some functionality you need in Excel 2007/2010/2013 you cannot find in 2003 or prior?
To rephrase, do you need XLSX format, or can you recode your solution to create either a CSV or XLS file?
If you don't need the drawing object, can you omit it?
Have you opened the XLSX file with 7Zip or Winzip to look at the contents in detail to ensure your code is generating the XML as expected?
This is the contents of the drawing1.xls from the file you attached previously:
Is there some functionality you need in Excel 2007/2010/2013 you cannot find in 2003 or prior?
To rephrase, do you need XLSX format, or can you recode your solution to create either a CSV or XLS file?
If you don't need the drawing object, can you omit it?
Have you opened the XLSX file with 7Zip or Winzip to look at the contents in detail to ensure your code is generating the XML as expected?
This is the contents of the drawing1.xls from the file you attached previously:
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<xdr:wsDr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing">
-<xdr:twoCellAnchor>
-<xdr:from>
<xdr:col>0</xdr:col>
<xdr:colOff>0</xdr:colOff>
<xdr:row>16</xdr:row>
<xdr:rowOff>0</xdr:rowOff>
</xdr:from>
-<xdr:to>
<xdr:col>12</xdr:col>
<xdr:colOff>95250</xdr:colOff>
<xdr:row>40</xdr:row>
<xdr:rowOff>95250</xdr:rowOff>
</xdr:to>
-<xdr:graphicFrame macro="">
-<xdr:nvGraphicFramePr>
<xdr:cNvPr id="1025" name="Chart 1"/>
-<xdr:cNvGraphicFramePr>
<a:graphicFrameLocks/>
</xdr:cNvGraphicFramePr>
</xdr:nvGraphicFramePr>
-<xdr:xfrm>
<a:off y="0" x="0"/>
<a:ext cy="0" cx="0"/>
</xdr:xfrm>
-<a:graphic>
-<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart">
<c:chart r:id="rId1"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart"/>
</a:graphicData>
</a:graphic>
</xdr:graphicFrame>
<xdr:clientData/>
</xdr:twoCellAnchor>
</xdr:wsDr>
What does your PHP code look like that generates the XLSX file?
Please submit it as a code block.
Please submit it as a code block.
ASKER
Its strange. When I run from PHPExcel exmples/33chrtcreate-bar.p hp, there is no error, but when I adjust this code to my needs in chart.php, I get the error. I don't understand. I am attaching both files.
33chartcreate-bar.php
chart.php
33chartcreate-bar.php
chart.php
Thank you APD_Toronto
ASKER