extractAbsencePercent function
Implementation
double extractAbsencePercent(Bs4Element cell) {
double currentPercent = 0.0;
var currentPercentText = cell.text;
if (currentPercentText.isNotEmpty) {
var textWithoutPercent = currentPercentText.replaceAll(r"%", '');
var textWithoutComma = textWithoutPercent.replaceAll(r",", '.');
double normalised = double.parse(textWithoutComma);
currentPercent = normalised / 100.0;
}
return currentPercent;
}