Carbone is a fantastic way to generate report starting from LibreOffice™ or Microsoft Office™ (ods, docx, odt, xslx...) documents.
All you have to do is to add a mustache-like placeholder {d.companyName}
in your template.
You have a big template with alot of placeholder {}
, i.e.:
It is very difficult to distinguish between text and placeholder. The more your template grows the more it seems a mess 😵💫.
The easiest thing to do is hightlight placeholders! 🤓
Macro is tested on LibreOffice 7.5.x, but it probably works with an older version as well.
- download file
CarboneIO-LibreOffice_Module.bas
- open LibreOffice™ Writer
- menu
Tools > Macros > Edit Macros...
In the macros IDE:
- menu
File > Import BASIC...
- select file
CarboneIO-LibreOffice_Module.bas
Return to LibreOffice™ Writer:
-
add some text and placeholders like:
Dear {d.name} {d.surname}, {d.years} years have passed since we met in {d.city}.
-
menu
Tools > Macros > Run Macro...
-
choose
highlightCarbonePlaceholder
That is! 🥳
Many thanks to KamilLanda 💪 that helped me so much with the LibreOffice™'s macro.