TranslateProject/sources/tech/20230403.2 ⭐️⭐️ Handle any type of document with this open source tool.md
2023-04-07 10:27:39 +08:00

8.3 KiB

Handle any type of document with this open source tool

Collabora Online supports all sorts of files and formats. How does this open source office suite do in terms of interoperability, though? This article takes a closer look at Collabora Online's ability to exchange complex text documents and spreadsheets with different office suites such as Microsoft 365 and Google Workspace.

Collabora Online is an open source office suite for the cloud or on-premises that protects your privacy and allows you to keep full control of your data. The software is developed by Collabora Productivity Ltd, in Cambridge, with its team working in locations worldwide. Collabora Online is based on LibreOffice Technology and is primarily licensed under the Mozilla Public License 2.0.

Collabora Online works in any modern web browser, requiring no additional plug-ins or add-ons. It features a complete cloud-based office suite, including a word processor (Writer), spreadsheet program (Calc), presentation software (Impress), and an application for designing vector graphics (Draw).

This article looks at some of the new Collabora Online's interoperability features, including macros, dynamic font loading, and Sparklines support for the spreadsheet application. These features extend the existing great handling of Microsoft file formats.

What is interoperability, and why does it matter?

In general, interoperability refers to the ability of different devices or applications to work together and exchange data seamlessly. In the context of office suites, interoperability is mostly about file formats. Users should be able to open, edit, and save .doc and .docx, .xls and .xlsx, .odt, and .ods documents, regardless of whether they were created with Microsoft Word, Apple iWork, or LibreOffice.

The same is true for online office suites. By ensuring that files can be exchanged between Microsoft 365, Google Workspace, and Collabora Online, interoperability helps to increase productivity and facilitate collaboration. All online office suites can save files in various formats. They can also import and export documents, spreadsheets, and presentations originally created in other office suites.

Managing macros and ensuring smooth document handling

Something that often causes problems are documents with macros. They're usually developed in a programming language specific to a particular application. While recording and editing macros in Google Sheets is possible, macros implemented in Visual Basic for Applications (VBA) in Microsoft Office cannot be converted and must be re-created with Google Apps Script. Opening a Word document with VBA macros produces errors and informs users that the macros will be ignored or disabled.

Collabora Online supports macros and runs them on the server side inside a container. The feature is disabled by default, and admins must explicitly activate it in the coolwsd.xml configuration file. After that, users can choose to allow macros when loading a document. There are several limitations, though. For example, it's not possible to access database sources, access other (external) documents, call external programs, use control shapes, and so on. Over the years, the amount of code and objects supported by Collabora Online has increased significantly, thanks to an active community and contributions from customers and partners.

Collabora Online: dynamic font loading

Another critical aspect of interoperability in office suites is fonts. Working with documents containing fonts that aren't available on a particular platform can result in errors, unexpected formatting changes, and even the complete loss of content.

Microsoft Office documents often use default fonts that aren't available in Google Workspace or Collabora Online. To address this issue, the office suites often suggest substituting missing fonts. That's often useful, but it sometimes leads to a bad result.

As of version 22.05.7 (released in November 2022), Collabora Online can list missing fonts and suggest substitutions. It can also download the necessary fonts and add them to the server. Everything happens dynamically, without downtime. New fonts become available in editing sessions within minutes for optimal interoperability.

Fonts can introduce a surprising complexity to your document, but Collabora Online can handle it.

To achieve that, information about missing fonts is tracked down by an API while the document is being rendered. A JSON file stores the list of fonts that need to be added. The coolwsd.xml file (the server-side settings) points to that JSON file. It checks for modifications once every minute and downloads the missing fonts.

Sparklines are tiny charts that fit inside a single cell of your worksheet, visualizing trends in data. Those miniature charts come in different styles, including lines, bars, and columns. Sparklines also support different colors and horizontal/vertical axis. Unlike larger charts that show as much data as possible and are separated from the text flow, Sparklines are reduced to the core values and typically placed next to or behind the data itself in the same cell. Sparklines are usually defined for one cell, but it's possible to group multiple Sparklines that share the same data range and properties for rendering.

Customize the look of Sparklines.

Sparklines are a compact reference and offer a quick way to illustrate trends, patterns, statistical anomalies, increases, and decreases, all while avoiding the complexity of a full chart. Here are some different Sparkline types:

  • Line Chart: Connects points by line segments from left to right and is particularly useful for displaying data that changes over a certain time.
  • Bar Chart: A graphical representation of data using horizontally aligned bars, often used to compare numerical data.
  • Column Chart: Ideal for comparing a series of values against each other; the columns are vertical, and their lengths indicate the relative size/value of the data. Column charts are often used to represent data of distinct categories or groups.

To create a Sparkline, you first define an input data range for the function (two or more cells in a column or a row). You also decide on the cell where you want the Sparkline to appear. In most spreadsheet applications, you right-click the mini chart to adjust its properties, select the chart type, and choose the colors. Collabora Online offers a separate dialog box for this, making it easy and convenient to change the style of the miniature charts.

Exchanging documents with Sparklines between the three online offices is possible without losing the graphs and their formatting. If you want to share spreadsheets between Microsoft 365, Google Workspace and Collabora Online, make sure to use the Microsoft format .xlsx for import and export, since Google Sheets doesn't handle .ods files very well.

Document exchange is easy

Collabora Online provides several new interoperability features, making exchanging documents with other office suites easy. Macro support, dynamic font loading, and Sparklines ensure seamless document handling, avoiding unexpected formatting changes. Use Collabora Online to unify and simplify your office work.


via: https://opensource.com/article/23/4/open-source-collabora-online-interoperability

作者:Heike Jurzik 选题:lkxed 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出