livewire-powergrid icon indicating copy to clipboard operation
livewire-powergrid copied to clipboard

[4x] - Independent export - opensspout v4 or v3 or other

Open luanfreitasdev opened this issue 2 years ago • 1 comments

⚡ PowerGrid ⚡ Pull Request

Guidelines

🗒️ Please read the Contributing Guide and follow all steps listed there.

✍️ Give this PR a meaningful title.

📣 Describe your PR details below.

Pull Request Information

from now on, openspout will not be included as a dependency

This will allow the user (developer) to choose which openspout version they want to use, versions 3 and 4 are currently supported. Defined in the configuration.

  • [x] should be able to choose open spout/openspout v4
  • [x] should be able to choose open spout/openspout v3
    • striped, columnWidth should not work
  • [x] check batch export
  • [ ] Add documentation

  • [ ] Bug fix
  • [x] New feature
  • [x] Breaking change

Related Issue(s)

This PR Fixes the Issue #515 .

Description

openspout v3

composer require openspout/openspout ^v3

config/livewire-powergrid.php

 'exportable' => [
        'default'      => 'openspout_v3',
        ...

openspout v4

composer require openspout/openspout ^v4

config/livewire-powergrid.php

 'exportable' => [
        'default'      => 'openspout_v4',
        ...

Batch export

current (deprecation)

public int $queues = 6; // Use two queues

public string $onQueue = 'my-dishes'; //queue name

public string $onConnection = 'redis'; // default sync

now

Exportable::make('export')
     ->striped()
     ->type(Exportable::TYPE_XLS, Exportable::TYPE_CSV)
     ->queues(6)
     ->onQueue('my-dishes')
     ->onConnection('redis'),

Contribution Guide

Documentation

This PR requires Documentation update?

  • [x] Yes
  • [ ] No
  • [ ] I have already submitted a Documentation pull request.

luanfreitasdev avatar Sep 10 '22 18:09 luanfreitasdev

im waiting this features, because "laravel/nova" use "rap2hpoutre/fast-excel" -> "openspout/openspout" v3

PatSpiegel avatar Sep 16 '22 15:09 PatSpiegel