Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how export row after filted #5

Open
TiagoPimentt opened this issue Apr 4, 2022 · 0 comments
Open

how export row after filted #5

TiagoPimentt opened this issue Apr 4, 2022 · 0 comments

Comments

@TiagoPimentt
Copy link

I have this code in use. But not export only filted

<div class="modo-box" style="">
    <div class="form-group">
    <input class="form-control" id="myInput" type="text" placeholder="Buscar..." autocomplete="off">
    <p id="emptyMsg2" style="display: none;">Nenhum registro encontrado.</p>
</div>
<div class="card card-body box-fix">
<table class="table table-bordered table-striped pt-5" id="table3">
    <thead>
        <tr> // this is table filted but when click in button for export get all rows
            <th class="ignore">#</th>
            <th>Marketplace</th>
            <th>Erro</th>
            <th>Total</th>
            <th>Representa</th>
        </tr>
    </thead>
    <tbody class="bodyResult">
        <tr>
            <td class="ignore">1</td>
            <td>VIAVAREJO</td>
            <td>ean - Sua loja já vende o produto Cinta Redutora de Medidas Cintura Hot Shapers Neotex Unissex com ean 7898601063189.</td>
            <td>2</td>
            <td>15.38%</td>
        </tr>
        <tr style="display: none;">
            <td class="ignore">2</td>
            <td>VIAVAREJO</td>
            <td>Imagens - É obrigatório informar pelo menos uma imagem</td>
            <td>2</td>
            <td>15.38%</td>
        </tr>
        <tr style="display: none;">
            <td class="ignore">3</td>
            <td>VIAVAREJO</td>
            <td>height - A altura deve ser um valor entre 0.01 e 7.00</td>
            <td>2</td>
            <td>15.38%</td>
        </tr>
    </tbody>
</table>
</div>
<div class="row container-fluid pt-4">
        <button class="btn btn-primary pull-right" id="export3">
            <i class="fa fa-file-excel-o" aria-hidden="true"></i> Exportar Dados </button>
    </div>
    $('#export3').click(function(){
        $("#table3").tableHTMLExport(
            {   type: 'csv',
                ignoreColumns:'.ignore',
                ignoreRows:'.ignore',
                filename: 'tebela_detalhes_erros_transf.csv'
            }
        );
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant