Skip to content

Commit

Permalink
cut sheet titles (tabnames) to 31 char (#4406)
Browse files Browse the repository at this point in the history
  • Loading branch information
jygaulier committed Nov 6, 2023
1 parent aaa60e3 commit a580d52
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ public function process(array $payload)
}
if(!array_key_exists($databox_id, $worksheet_ref_by_db)) {
// Create a new worksheet with db name
$ws = new Worksheet($spreadsheet, $this->app->getApplicationBox()->get_databox($databox_id)->get_dbname());
$tab_name = substr($this->app->getApplicationBox()->get_databox($databox_id)->get_dbname(), 0, 31);
$ws = new Worksheet($spreadsheet, $tab_name);
$spreadsheet->addSheet($ws);
if(count($worksheet_ref_by_db) === 0) {
// we just added the first ws, we can delete the "default" one
Expand Down

0 comments on commit a580d52

Please sign in to comment.