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.

showGridLines for printing not working

See original GitHub issue

I create a worksheet with this code: const worksheet = workbook.addWorksheet(sheetName, { pageSetup: { showGridLines: true, fitToPage: true, fitToWidth: 1, fitToHeight: 0, orientation: 'landscape', horizontalCentered: true, printTitlesRow: '1:1', } } ); But when I print the excel downloaded, there are no gridLines. I have tried with every showGridLine properties without success.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Alanscutcommented, Feb 4, 2020

if you want to control whether gridLines are showed in View mode, you should set it with views(array) property:

var sheet = workbook.addWorksheet('My Sheet', {views: [{showGridLines: false}]});
// or
worksheet.views = [
  {showGridLines: false}
];

in Print mode, you should set it with pageSetup(object) property:

var sheet = workbook.addWorksheet('My Sheet', {pageSetup: {showGridLines: false}});
// or
worksheet.pageSetup.showGridLines= false;
0reactions
mehrshadFarzanehcommented, Feb 11, 2022

this cod: worksheet.pageSetup.showGridLines = true; not work

if you want to control whether gridLines are showed in View mode, you should set it with views(array) property:

var sheet = workbook.addWorksheet('My Sheet', {views: [{showGridLines: false}]});
// or
worksheet.views = [
  {showGridLines: false}
];

in Print mode, you should set it with pageSetup(object) property:

var sheet = workbook.addWorksheet('My Sheet', {pageSetup: {showGridLines: false}});
// or
worksheet.pageSetup.showGridLines= false;
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix “Excel Not Printing Gridlines”?
Simply go to the Sheets Options group on the PAGE LAYOUT tab and check the Print box under Gridlines. Yes, it is that...
Read more >
Unable to get rid of gridlines when printing in Excel 2013.
Hello - I have tried everything to get the gridlines in my worksheet not to display when printing. I have tried: 1) View...
Read more >
How to Show Grid Lines When Printing in Microsoft Excel
How to Show Grid Lines When Printing in Microsoft Excel · 1. Select the worksheet or worksheets you want to print, and then...
Read more >
How to Hide, Show, and Print Gridlines in Microsoft Excel
Whatever your scenario, we'll show you how to work with the gridlines in Excel to show, hide, print, or not print them.
Read more >
Gridlines in Excel - How to Remove it, Change it, and Print it
Working with Gridlines in Excel: How to Add, Remove, Change, and Print Gridlines · How to Remove Gridlines in Excel Worksheets · How...
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