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

Exporting search options and results - Suggestions? #42

Closed
DragonI opened this issue Mar 13, 2014 · 1 comment
Closed

Exporting search options and results - Suggestions? #42

DragonI opened this issue Mar 13, 2014 · 1 comment

Comments

@DragonI
Copy link

DragonI commented Mar 13, 2014

I have a report that has multiple search options. I need to add the options into the csv file.

I tried adding an HTML table just for the options but it didn't work, in that, it wasn't included in the csv file. I deleted all of the cache files before testing.

I thought about creating a blade file specifically for Excel. Where the search criteria would be inserted as the first row but I'm lazy.

Any suggestions?

Context

  1. The file format has to be csv
  2. My report uses the same blade for viewing the results via the browser and when exporting to a csv file.
  3. The 2nd HTML table that cycles through the results does produce the correct output.
<!-- table.blade.php -->

<!-- List Search Criteria - $inputArray format is csv -->
@if ( isset( $inputArray['format'] ) && $inputArray['format'] == 'csv' )
<table>
    <tbody>
    <tr>
        <td>
            Searched By:
            @foreach ( $inputArray as $key => $val )
                {{ $key }} {{ $val }}
            @endforeach
        </td>
    </tr>
    </tbody>
</table>
@endif

<!-- results table - results work -->
<table id="user-list" class="table table-striped table-bordered table-hover sortable-theme-bootstrap" data-sortable>
    <thead>
      ...
    </thead>
    <tfoot>
        ...
    </tfoot>
    <tbody>
        ...
    </tbody>
</table>
@MaatwebsiteSupport
Copy link
Contributor

I don't understand what you want exactly. You want the first row of the CSV file to be a list of search-terms?
Could you provide an example of the end result you want?

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

2 participants