Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

How change row number position in the sheet.

$
0
0

Hi all!

I want change my excel file and remove from them all existing empty rows before my data.

Example: I have before 

I want to have after: 

I don't know how I can fast modify my files in Open XML 2.5.

But I found solution for Microsoft.Office.Interop.Excel: 

//Create a new Workbook.
//Open an existing excel file.
Workbook wb = new Workbook(@"d:\test\book1.xls");

//Create a Worksheets object with reference to
//the sheets of the Workbook.
WorksheetCollection sheets = wb.Worksheets;

//Get first Worksheet from WorksheetCollection
Worksheet sheet = sheets[0];

//Delete the Blank Rows from the worksheet
sheet.Cells.DeleteBlankRows();

But I must't use excel app on server side...

Help me please)



Viewing all articles
Browse latest Browse all 1288

Trending Articles



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