Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81916

Export Empty cells

$
0
0

Could you allow a customize option to export empty cells? The reason is if empty cells are not exported a style can not be applied because there is no cell definition. I would like to put a thin border around column B, but because cell B177 isn't defined the style will not be applied to B177 and when you look at the excel spreadsheet it looks ugly.

The current code (buttons.html5.js line 1040) skips over any null, undefined or blank cells.

                // For null, undefined of blank cell, continue so it doesn't create the _createNode
                if ( row[i] === null || row[i] === undefined || row[i] === '' ) {
                    continue;
                }

An update could look like

                    // For null, undefined of blank cell, continue so it doesn't create the _createNode
                    if (row[i] === null || row[i] === undefined || row[i] === '') {
                        if (config.exportEmptyCells) {
                            cell = _createNode(rels, 'c', {
                                attr: {
                                    r: cellId
                                }
                            });
                            rowNode.appendChild(cell);
                        }
                        continue;
                    }

Viewing all articles
Browse latest Browse all 81916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>