switch to excel cell formats for report exports (#3178)

This commit is contained in:
Kevin Papst
2022-02-27 13:36:52 +01:00
committed by GitHub
parent c0168ecc5b
commit 42963ead5c
4 changed files with 64 additions and 33 deletions

View File

@@ -45,11 +45,16 @@ abstract class AbstractSpreadsheetRenderer
public const TIME_FORMAT = 'hh:mm';
public const DURATION_FORMAT = '[hh]:mm';
public const DURATION_DECIMAL = '#0.00';
// https://support.microsoft.com/de-de/office/zahlenformatcodes-5026bbd6-04bc-48cd-bf33-80f18b4eae68
// Part 1 = positive; Part 2 = negative; Part 3 = zero; Part 4 = Text
public const RATE_FORMAT_DEFAULT = '#.##0,00 [$%1$s];-#.##0,00 [$%1$s]';
public const RATE_FORMAT_LEFT = '_("%1$s"* #,##0.00_);_("%1$s"* -#,##0.00;_("%1$s"* "-"??_);_(@_)';
public const RATE_FORMAT = self::RATE_FORMAT_LEFT;
/**
* @internal used in html to excel exporter
*/
public const RATE_FORMAT_NO_CURRENCY = '#,##0.00;-#,##0.00';
protected $durationFormat = self::DURATION_FORMAT;
protected $durationBase = 86400;