Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 15B2C200BA0 for ; Fri, 14 Oct 2016 20:40:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 14565160ADD; Fri, 14 Oct 2016 18:40:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5ABD3160AD3 for ; Fri, 14 Oct 2016 20:40:42 +0200 (CEST) Received: (qmail 72869 invoked by uid 500); 14 Oct 2016 18:40:36 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 72858 invoked by uid 99); 14 Oct 2016 18:40:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2016 18:40:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D7294181BC1 for ; Fri, 14 Oct 2016 18:40:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id vbJ4bVAuGzkK for ; Fri, 14 Oct 2016 18:40:34 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 795095F570 for ; Fri, 14 Oct 2016 18:40:34 +0000 (UTC) Received: from asf-bz1-us-mid.priv.apache.org (nat1-us-mid.apache.org [23.253.172.122]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTPS id AFAEAE00A5 for ; Fri, 14 Oct 2016 18:40:33 +0000 (UTC) Received: by asf-bz1-us-mid.priv.apache.org (ASF Mail Server at asf-bz1-us-mid.priv.apache.org, from userid 33) id 84F3D60E84; Fri, 14 Oct 2016 18:40:32 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: [Bug 60258] New: XLSX files created in POI unreadable in Excel 2013+ due to AbsolutePath in workbook Date: Fri, 14 Oct 2016 18:40:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: XSSF X-Bugzilla-Version: 3.15-FINAL X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: tywdev@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bz.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 archived-at: Fri, 14 Oct 2016 18:40:43 -0000 https://bz.apache.org/bugzilla/show_bug.cgi?id=60258 Bug ID: 60258 Summary: XLSX files created in POI unreadable in Excel 2013+ due to AbsolutePath in workbook Product: POI Version: 3.15-FINAL Hardware: PC Status: NEW Severity: major Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: tywdev@gmail.com I'm creating spreadsheets in Apache POI 3.15 (I was using 3.9 but upgraded once I saw that CT_FileVersion was rendered useless) for use on Excel 2013 using the XSSF format and I receive the "unreadable content" message when opening the workbook. After allowing Excel to find the issues, I went and saw that it discovered that the workbook had (1) an author, (2) Absolute Path. The author issue was easily resolved by modifying the CoreProps but the Absolute Path issue is another headache. So Excel 2013 (and up) are using a newer schema (http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac Schema) that includes the CT_AbsolutePath attribute that does not exist in the schemas used by POI. Upon further investigation, I let Excel fix the issue and compared the workbook.xml files of a "broken" spreadsheet and a fixed one. The difference is that Excel 2013 adds two namespaces (one with an attribute/value) and an element with 3 attributes/values. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" The x15 and fileVersion items come into play with this explanation: "Workbook.xml contains information about the Excel file such as worksheet names, window height and width parameters, and a bit of other information. For the most part, this XML file appears to be similar across files created using Excel 2007, 2010, and 2013, however, there is one key difference: the "x15ac:absPath" element. The "x15ac:absPath" element is a child element of "mc:Choice" (which is a child element of "mc:AlternateContent") and contains an attribute called "url" that corresponds to the last saved location of the spreadsheet." AND "If you know that a spreadsheet was created using Excel 2013 but are unable to find the last saved location metadata, it's possible that the spreadsheet was last saved in a version of Excel other than 2013. This can be verified through the "fileVersion" element, which is the first child element of "workbook". The "fileVersion" element includes an attribute called "lastEdited" and, according to Microsoft documentation, the "lastEdited" attribute "specifies the version of the application that last saved the workbook". Interestingly, the value specified in the "lastEdited" attribute is not consistent with the application version of Excel (i.e. 2007=12.x, 2010=14.x, etc.). Instead, this value is a single-digit numeral corresponding to a particular version of Excel. I've ran some quick tests using 2007, 2010, and 2013 and summarized the corresponding fileVersion values for each Excel version in the table below." FYI: the value "6" on lastEdited and lowestEdited refers to Excel 2013. I have been trying to edit the xml before the download of the spreadsheet since I'm using JDeveloper 11g and am sending it through a HttpServletResponse outputstream but that's proving to be ...not possible for me :). ANY assistance with this would be awesome. Thanks. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org