The method replaceVariableByText replaces a text cell with another value. It would be nice to format this cell afterwards. Example: when I set some numeric value in a variable field, the format of the cell should be set to numeric.
Please see the following example:
$value = 4.5;
$xlsx = new CreateXlsxFromTemplate("template.xlsx");
$xlsx->replaceVariableByText(["variable" => $value]);
// The cell value is now 4.5
// The following is not possible:
$xlsx->modifyVariableCell("variable", ["type" => "number"]);
I looked into the method getTemplateVariables. This gives me a list of variable names, but not their cell coordinates. If I have these coordinates, I can just use addCell on that coordinate.
Is there a way to accomplish this?