Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / PageLayout Class / RemovePageBreaksAtCell Method
The Address of the Cell that is used as a reference point for the removal; both the page breaks on top & at the left of this Cell will be removed.
Example


In This Topic
    RemovePageBreaksAtCell Method
    In This Topic
    Removes page breaks from the Worksheet, using the location of a specific Cell to determine which page breaks will be removed.
    Syntax
    'Declaration
     
    
    Public Sub RemovePageBreaksAtCell( _
       ByVal cellAddress As String _
    ) 
    'Usage
     
    
    Dim instance As PageLayout
    Dim cellAddress As String
     
    instance.RemovePageBreaksAtCell(cellAddress)
    public void RemovePageBreaksAtCell( 
       string cellAddress
    )

    Parameters

    cellAddress
    The Address of the Cell that is used as a reference point for the removal; both the page breaks on top & at the left of this Cell will be removed.
    Example
    public static void PageMarginsAndPageBreaks()
    {
      using( var workbook = Workbook.Create( PageLayoutSample.PageLayoutSampleOutputDirectory + @"PageMarginsAndBreaks.xlsx" ))
        {
          // Gets the first worksheet; a workbook always contains at least 1 worksheet.
          var worksheet = workbook.Worksheets[0];
    	  
          // Adds a title.
          worksheet.Cells["B1"].Value = "Page Margins and Breaks";
          worksheet.Cells["B1"].Style.Font = new Font() {Bold = true, Size = 15.5d};
    	  
          // Inserts page breaks using specific cells as a target location for the insertion.
          worksheet.PageLayout.InsertPageBreaksAtCell("B2");
          worksheet.PageLayout.InsertPageBreaksAtCell("C3");
    	  
          // Removes page breaks using a specific cell as the target location for the removal.
          worksheet.PageLayout.RemovePageBreaksAtCell("B2");
    	  
          // Saves workbook to disk.
          workbook.Save();
          Console.WriteLine( "/tCreated:PageMarginsAndBreaks.xlsx/n" );
        }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also