Do you want to calculate totals, automate conditions, or display dynamic results in your Kraaft Excel report? It's possible by exporting your reports — and the method depends on the type of field and formula used 🧮
→ Prerequisite: have a Kraaft Excel report template configured on your report ✅
🏗️ Which reports is this useful for?
Excel templates with formulas are particularly suited to reports that require advanced calculations 📊:
Timesheet reports — hours worked, overtime, attendance
Equipment inventories and stock — quantities, totals, valuation
Delivery notes — price calculations, quantities delivered, summaries
Site logs — equipment, prices, contractors and staff present, full logistics
🔢 Starting point: Number field or another type?
Formula behaviour depends on the Kraaft field type the tag comes from:
Field type | Exported value | Applicable formulas |
Number field | Numeric value | Directly on the cell, no manipulation needed |
All others (text, date, time, checkbox...) | Text | Requires conversion via the hidden sheet |
💡 The 2 types of formulas
🧮 Calculation formulas — SUM, +, COUNT...
SUM() — recommended for Number fields ✅
The SUM() formula automatically ignores empty cells and non-numeric values — no error if a field wasn't filled in Kraaft 🎉
=SUM(B2,B3,B4) → adds up quantities or amounts =SUM(B2:B20) → total of an entire column =COUNT(B2:B10) → counts the number of filled fields
Addition with ✚ — for text fields containing numbers
Excel automatically converts text to numbers. However, it returns an error if a cell is empty ⚠️ — if you use it, make sure empty cells display 0 (that's the role of the hidden sheet explained below).
=B2+B3+B4
⚡️ IF formulas — to replace conditional tags
The conditional tags ##IF## / ##END-IF## don't work in Excel, but Excel's IF formulas let you work around this limitation 💡
The structure of an IF formula is always the same:
=IF( condition , value if true , value if false )
Examples:
📋 Retrieve a value only if the field is filled — if the cell contains something, display its value; otherwise leave it empty:
=IF(B2<>"",B2,"")
→ If B2 is not empty → displays the value of B2 / Otherwise → empty cell
🏷️ Display text based on a cell's content — if the cell contains a specific word, display a label; otherwise display something else:
=IF(B2="Yes","Validated","Not validated")
→ If B2 contains exactly "Yes" → displays "Validated" / Otherwise → displays "Not validated"
🛠️ The hidden sheet: conversion sheet and calculation draft
For all non-numeric fields, text values must be converted to numbers before they can be used in formulas. The hidden sheet plays this role — it's also a draft sheet to centralise all your logic (calculations, conditions, nested formulas) 📋
Typical structure:
Column A | Column B | Column C |
Kraaft tags ##date-pointage##
| Text or date conversion → number or special format (=IF(A2="",0,A2)) | Final formulas (SUM, IF...) based on column B |
The main sheet only retrieves the results by pointing to column C.
👩🏫 Setup steps:
Create a new sheet in your Excel template (e.g. Calculations) 🗂️
Paste your tags in column A
Mirror formula in column B — converts to number, displays 0 if the field is empty:
=IF(A2="",0,A2)
→ If A2 is empty: displays 0 (avoids calculation errors) / Otherwise: displays the value of A2
Formulas in column C — calculations or conditions based on column B:
=SUM(B2,B3)
On the main sheet, point to the result in column C:
=Calculations!C1
Hide the tab — right-click → Hide, the hidden sheet does not appear in the PDF shared with your clients 👀
💡 Example: total hours on a timesheet report
Calculations sheet:
A (tags) | B (mirror) | C (total) |
##heure## | =IF(A2="",0,A2) | =SUM(B2,B3) |
##heure_sup## | =IF(A3="",0,A3) | / |
Main sheet: retrieve the total cell →
=Calculations!C1
⚠️ Reminders:
🕐 Decimal format: Kraaft exports durations in decimal (8h30 = 8.5).
→ Right-click → Format cells on the result cell to display as [h]:mm or as a number.
📤 Formulas and calculations do not appear in PDF exports — they only work in Excel exports 📊
💬 Need help? Contact our support!
