Laravel-excel: [QUESTION] Is there any method to get highest row and column on dynamic data using FrowView (blade) ?

Created on 7 Oct 2020  路  3Comments  路  Source: Maatwebsite/Laravel-Excel

Prerequisites

Versions

  • PHP version: 7.2.5
  • Laravel version: 7.0
  • Package version: 3.1

Description

I have a Export class using FrowView (blade table). And I want to put an 'all borders' to every rows and columns so that all the exported data have a border and forming a table. My data have a dynamic number of rows and columns.

Does Laravel-Excel have a method to get the highest row and column (ex: "A2:AG12") so that I don't need to create a logic to get the excel's column name and do a join query on my repository to get the row num?
Any help would be very appreciated! Thanks.

Additional Information

Only single sheet need to be exported.

question

All 3 comments

Update: i've found a way to get string from index manually using query to determine the index value in integer:
\PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($index);

In AfterSheet event:

$sheet->getDelegate()->getHighestRow()
$sheet->getDelegate()-> getHighestColumn();

You're my hero! Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthewslouismarie picture matthewslouismarie  路  3Comments

daraghoshea picture daraghoshea  路  3Comments

pamekar picture pamekar  路  3Comments

bahmanyaghoobi picture bahmanyaghoobi  路  3Comments

lucatamtam picture lucatamtam  路  3Comments