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.

ws['!cols'] not working for ods

See original GitHub issue

I am trying to change cols size for ods file but it is not working for some reason, it does work if I export as xlsx. This what I am doing at the moment: const schools = [{wpx:100}, {wpx:50},{wpx:150}];const ws = XLSX.utils.aoa_to_sheet(value); const wb = XLSX.utils.book_new(); ws['!cols'] = wscols; XLSX.utils.book_append_sheet(wb, ws, 'SpreadSheet'); XLSX.writeFile(wb, 'export.ods', {bookType: "ods"}); any idea what I am doing wrong? Thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
SheetJSDevcommented, Aug 28, 2021

@vishal80072 the file formats don’t have “auto”, and calculating the right width in pixels requires knowledge of the base font among other things.

Marking as dupe of #1208

0reactions
dahrougomarcommented, Nov 16, 2022

Did someone find a way to set the width for the columns?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ws['!cols'] not working for ods · Issue #1454 · SheetJS ... - GitHub
I am trying to change cols size for ods file but it is not working for some reason, it does work if I...
Read more >
ODS Excel won't work - SAS Support Communities
I put ODS Excel code section in front of proc sql and several proc freq. After running the program, ... What is this...
Read more >
gts-xlsx-style - NPM Package Overview - Socket.dev
Excel (XLSB/XLSX/XLSM/XLS/XML) and ODS spreadsheet parser and writer ... Report any issues to https://github.com/protobi/js-xlsx/issues.
Read more >
node_modules/xlsx · demo · Clarice Larson / cold-chain-app ...
ODK App Designer Wiki and Issues ... Excel 5.0/95 (XLS BIFF5); OpenDocument Spreadsheet (ODS) ... Working with the Workbook.
Read more >
Unleash the Power of PROC REPORT With the ODS EXCEL ...
We could not utilize ODS ExcelXP tagset well for our ... work of formatting the report may be time consuming, ODS EXCEL provides...
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