Quantcast
Viewing all articles
Browse latest Browse all 1621

New Post: Applying cell style to a merged region

Hello, I pretty sure you solved this one or no longer need it but I'm adding a solution anyway for anyone in the future.
I'd the same issue and I solved it by applying the same style to all cells included in the merged region before adding the merged region to the sheet.

so for you own code, it will be something like this before the "_merge all cells on the row_" comment
for(var i=0; i<=columnCount ; i++)
{
    var cell = row.GetCell(i) ?? row.CreateCell(i);
    cell.CellStyle = _cellStyles["title_fema"];
}

Viewing all articles
Browse latest Browse all 1621

Trending Articles



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