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.

Merged cell handling

See original GitHub issue

First, thank you for this library. Second, if I’m in the wrong place to be asking questions, I apologize.

I’m working with documents that contain merged cells. I’d like to iterate over rows and for a particular cell grab the value in a column header above it. The column headers are in merged cells.

Based on the demo, the sheet.xml files, and relevant sections of the spec (29500-1 SS 18.3.1.55 and A.2 ln. 2293 through ln. 2298), it seems the merge cell value is always in the top left cell and subsequent cells in the merge range are undefined.

Are there any helper attributes on the JS object of a merged cell (obj.mergeValue or obj.isMergeCell) or is that something I’ll have to handle myself?

Cheers and thank you for your time! 🍻

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
ashish-agarwal24commented, Oct 12, 2016

can someone tell me how to write in the merged cell?

1reaction
mpoluttacommented, Apr 5, 2016

Example for write:

var merges = wb.sheets["mysheetId"]['!merges'] = [];
//then push merges into array
merges.push( { s: 'A1', e: 'F1' } );
Read more comments on GitHub >

github_iconTop Results From Across the Web

Merge and unmerge cells - Microsoft Support
Merge cells · Select the cells to merge. · Select Merge & Center. Important: When you merge multiple cells, the contents of only...
Read more >
Excel Tips: Why You Should Avoid Merging Cells - GCF Global
Excel allows you to merge several cells into a single large cell, which can be used to center text across several rows or...
Read more >
How to Find Merged Cells in Excel (and then get rid of it)
Select the cells in which you want to find the merged cells. · Go to Home –> Editing –> Find & Select –>...
Read more >
Handling merged cell in C1Excel - GrapeCity
C1Excel lets you merge multiple cells, so as to display them as a single cell. Further it even lets you wrap the cell...
Read more >
Merge Cells in Excel - Corporate Finance Institute
Select the cells you want to merge. Highlight them with your mouse or by starting in one cell, holding Shift, then using the...
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