How to insert a blank row in Excel from c# -


i have template looks

my header bla bla bla  name1  name2 name3   footer bla bla bla 

put line in loop:

for (int = 0; < datasource.length; i++)             {                 objworksheet.cells[i+7, 1] = "row1";                 objworksheet.cells[i+7, 2] = "row2";                 objworksheet.cells[i+7, 3] = "row3";                 } 

and table looks like:

my header bla bla bla      name1  name2 name3     row1   row2   row3     row1   row2   row3     row1   row2   row3 

data overwritten footer. want insert blank line loop put footer @ each step. how it?

you can try this:

datacolumn dt= new datacolumn(); dt.columns.add("");  objworksheet.insertdatacolumn(dt, true, 1, 0); 

in insertdatacolumn, first parameter datacolumn,
second columnheader, bool type (true or false),
third row number, type int
fouth column number, type int


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -