windows - Proper SpreadsheetML file extension -


i want create a spreadsheetml file on local drive can opened in ms excel or open office clicking on file in windows explorer.

i tried filename extensions registered microsoft excel find far. of them (.xls example) allows file opened, after "file in different format specified file extension" warning dialog. extensions (like .xlsx) causes excel show format error dialog without opening file.

wikipedia tells extension should .xml, registered opened web browser default.

this, this , this similar questions downloading file web , setting proper content-type. can not change content-type local file.

this article explains how annoying extension hardening mechanism works , how disable it, think wrong force user disable security features allow spreadsheet file opened.

so there no solution or missing something?

now open office can open .xlsx (and read) files , excel can open (and read) .ods files. suggestion pick 1 of them best suits audience , understanding of specific file format.

both of applications have advantages , disadvanges , non-supported features between 2 of them.

i suggest reviewing document differences between opendocument spreadsheet (.ods) format , excel (.xlsx) format.

when work 2 file formats, .xlsx , .ods, there might formatting differences, , not features available. you’ll able convert data , content, way work content might different depending on formats use.

one gotcha open office when save .xlsx file change format .ods file. both applications re-arrange folder structure after saving anyway.

the biggest change how go creating spreadsheetml files, both open office , excel have different folder structure depending on file extension use.

here short example of excel folder format.

-/  - _rels/    - .rels  - xl/    - _rels/      - workbook.xml.rels    - sheet1.xml    - workbook.xml  - [content_types].xml 

i have created sample github repository sample open in both excel , open office.

https://github.com/nico-stackoverflow/proper-spreadsheetml-file-extension


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -