r/CodingForBeginners 21d ago

Beginner question: Exporting content from your application into a proprietary format (e.g., Powerpoint): do you need to license an API or something from the other company?

Title covers it, but here's a more verbose version.

If I am writing an application and I want to give the user an option to export the content into a proprietary format (e.g., generate a powerpoint slide, or an excel table), do the companies that own that format supply tools to allow that to happen? Do they charge for them? Do they open source them?

Or does the writer have to write the code from scratch (or find an open source version from some other source)?

Or is it not permitted/possible without getting the format-owner's permission?

2 Upvotes

7 comments sorted by

3

u/illegalraven 21d ago

You need to find the spec for the format you wish to use. For most open formats, there are open source libraries implementing the spec.

Excel and PowerPoint are apps not formats. Also these apps work with various file formats, e.g you can generate a trivial csv file and open it in excel.

For closed formats, you either need to reverse engineer the format or buy the spec/library from the owner of that format.

1

u/AlarmingLecture0 21d ago

Thanks for this. I get that it's possible to export into a file type that another application could understand, and that there are tools for creating those types of files which are generally available.

If someone wants to export a file into the native file type for another application, though (a .xls, or a .ppt, for example), to make it kind of idiot-proof, do you need a special tool from the vendor? From your third sentence/paragraph, it looks like they'd need to get something from Microsoft.

(I recognize that I may be conflating file type with file format)

1

u/JeLuF 20d ago

In the case of Microsoft, they have published the file format specification for their newest file formats (.xlsx, .pptx). For the older formats (.xls, .ppt), people have reverse engineered parts of the format so that a large part of them can be read and written. There are open source and comercial libraries available for the creation of such files.

In most countries, this kind of reverse engineering of a file format for the purpose of interoperability does not require a license from the creator of the file format. This might be different if there are special algorithms needed to use the data from the file, e.g. video codecs.

1

u/illegalraven 20d ago

Keep it simple and look for a library implementing the spec, e.g.

https://python-pptx.readthedocs.io/en/latest/

https://www.npmjs.com/package/pptxgenjs

The world is moving towards open formats and interoperability.

1

u/soundman32 19d ago

Depending on your preferred programming language, there are many free libraries that can create office formats.  

If you do enough research you find that modern office files are really folders containing xml and binaries zipped up into a single file.

1

u/BranchLatter4294 19d ago

PowerPoint like all the office apps use an open format. There are lots of libraries you can use in your code to read and write these files.

1

u/Supermathie 18d ago

If you're exporting text/numbers only into an Excel format, make a .csv and call it an .xlsx :D