question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello,

I’m still unsure how to export an XLSX version of the table. I have the latest published version of bootstrap-table-export.js and all other exports work fine. There is no option for XLSX

I tried to modify the code to this:

var TYPE_NAME = {
    json: 'JSON',
    xml: 'XML',
    png: 'PNG',
    csv: 'CSV',
    txt: 'TXT',
    sql: 'SQL',
    doc: 'MS-Word',
	excel: 'MS-Excel',
	xlsx: 'MS-Excel (OpenXML)',
    powerpoint: 'MS-Powerpoint',
    pdf: 'PDF',
  };

  $.extend($.fn.bootstrapTable.defaults, {
    showExport: false,
    exportDataType: 'all', // basic, all, selected
    // 'json', 'xml', 'png', 'csv', 'txt', 'sql', 'doc', 'excel', 'powerpoint', 'pdf'
    exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel', 'xlsx'],
    exportOptions: {},
  })

Export Failed to execute ‘createObjectURL’ on ‘URL’

My scripts are loaded as:

<script src="bootstrap-table.min.js"></script>
<script src="tableExport/libs/js-xlsx/xlsx.core.min.js"></script>
<script src="tableExport/tableExport.js"></script>
<script src="bootstrap-table-export.js"></script>

Is there something else I should be loading or another version of your code available?

Thanks for your help!

Rob

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rfossellacommented, Dec 20, 2017

Yes, I looked through those docs many times. It’s just unclear. I also tried the following, again getting only visible rows exported: $('#my_table').bootstrapTable({exportDataType: 'all'}).tableExport({type:'excel', worksheetName: 'MyDataSheet'});

FYI: The following gives me ALL JSON: $('#my_table').bootstrapTable('getData')

Anyway, thanks for your help.

0reactions
marco-enciso-salinascommented, Jan 12, 2019

Hi. Is there a way to export ALL table rows and not just the visible ones - e.g. the first 50 shown in the table?

You can select All from the dropbox to show all records and then click export data

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an XLSX file? - File Format Docs
XLSX is well-known format for Microsoft Excel documents that was introduced by Microsoft with the release of Microsoft Office 2007. Based on structure...
Read more >
xlsx - npm
SheetJS Spreadsheet data parser and writer. Latest version: 0.18.5, last published: 9 months ago. Start using xlsx in your project by ...
Read more >
XLSX File Extension - What is an .xlsx file and how do I open it?
An XLSX file is an Excel spreadsheet created by Microsoft Excel or exported by another spreadsheet program, such as OpenOffice Calc or Apple ......
Read more >
What is an XLSX File (and How Do I Open One)? - How-To Geek
A file with the .xlsx file extension is a Microsoft Excel Open XML Spreadsheet (XLSX) file created by Microsoft Excel.
Read more >
[MS-XLSX]: Excel (.xlsx) Extensions to the Office Open XML ...
Specifies the Excel (.xlsx) Extensions to the Office Open XML SpreadsheetML File Format, which are extensions to the Office Open XML file ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found