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.

Style format is broken after read and save the same file

See original GitHub issue

Looks like js-xlsx is not supporting:

  1. Font HTML tags -
<B><Font html:Color="#000000">Note:</Font>
  1. Style references by id’s
<Style ss:ID="s151">
   <Alignment ss:Horizontal="Left" ss:Vertical="Center"/>
   <Font ss:FontName="Calibri" ss:Size="12" ss:Color="#000000" ss:Bold="1"/>
  </Style><Cell ss:MergeAcross="8" ss:StyleID="s151"><Data ss:Type="String">Provider Location Report</Data></Cell>
  1. Row borders and ss:Vertical tags ( i think the same issues with styles id’s
<Cell ss:MergeAcross="5" ss:StyleID="m40475996"><Data ss:Type="String">Metro Legend</Data></Cell>
  <Style ss:ID="m40475996">
   <Alignment ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="12" ss:Color="#000000"
    ss:Bold="1"/>
   <Interior ss:Color="#D9D9D9" ss:Pattern="Solid"/>
  </Style>

Template XLSX

simple_template.xlsx

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

34reactions
SheetJSDevcommented, May 20, 2018

We offer this in the Pro compendium. Since companies have paid for the features already, it would be unfair to them if we turned around and made it available as open source. We have a longer comment in a gist.

2reactions
dgofmancommented, Jan 12, 2016

var XLSX = require(‘xlsx’); var wb = XLSX.readFile(‘./reports/templates/simple_template.xlsx’,{cellStyles:true}); XLSX.writeFile(wb,‘out.xlsx’,{bookSST:true});

Read more comments on GitHub >

github_iconTop Results From Across the Web

Word document formatting is not retained ... - Microsoft Support
Describes a problem in which a source document takes on the formatting of the destination document, even if you insert a section break....
Read more >
Troubleshoot damaged InDesign documents - Adobe Support
From the Character Styles menu, choose Delete Styles. Save your document and see if it's fixed. If the problem persists, try deleting paragraph ......
Read more >
How to fix Mail Merge formatting issues in Word - Ablebits
Before starting a mail merge, perform the following steps in Microsoft Word. Go to File > Options > Advanced. Scroll down to the...
Read more >
Apply formatting rules | JetBrains Rider Documentation
Automatically apply formatting preferences on saving changes · Press Ctrl+Alt+S to open the IDE settings and select Tools | Actions on Save. ·...
Read more >
Change settings in TextEdit on Mac - Apple Support
Open and Save options · Document type: Set the default document type when saving HTML files. · Styling: Set the default type of...
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