GroupDocs.Merger for Python via .NET

Remove pages from XLSX

GroupDocs.Merger for Python via .NET brings powerful page removal capabilities to your Python applications, making document management easier.

Steps to remove pages from XLSX

With GroupDocs.Merger, you can quickly delete pages from XLSX documents. Integrate it into your Python via .NET apps for enhanced document management.

  1. Provide the file path of the XLSX document.
  2. Select the pages you want to delete.
  3. Run the removal operation.
  4. Save the updated document.
import groupdocs.merger as gm

# Initialize a Merger instance with the file path
with gm.Merger("document.xlsx") as merger:
    
    # Specify which pages to delete
    removeOptions = gm.domain.options.RemoveOptions([2])

    # Apply page removal settings
    merger.remove_pages(removeOptions)

    # Save the updated document
    merger.save("result.xlsx")
npm i @groupdocs/groupdocs.merger
click to copy
copied
More examples Documentation

Advanced document handling

GroupDocs.Merger for Python via .NET simplifies working with documents by providing a full set of tools for over 50 popular file formats.

Main features of GroupDocs.Merger

Merge different file types

Combine PDFs, Word files, presentations, spreadsheets, images, and archives with precise merging options.

Manage pages easily

Move, swap, or remove pages to organize your documents exactly as needed.

Adjust page orientation

Rotate pages to any angle or switch between portrait and landscape mode.

Extract pages as new files

Select specific pages and save them separately as new documents.

Delete all even-numbered pages

Learn how to remove even pages from a XLSX file.

JavaScript

import groupdocs.merger as gm

# Load the file by specifying the path
with gm.Merger("document.xlsx") as merger:
  
    # Get the total number of pages
    info = merger.get_document_info()
    lastPage = info.page_count

    # Set up options to remove even pages
    rangeMode = gm.domain.options.RangeMode.EvenPages
    removeOptions = gm.domain.options.RemoveOptions(1, lastPage, rangeMode)

    # Process the document
    merger.remove_pages(removeOptions)

    # Save the modified document to the chosen location
    merger.save("result.xlsx")
npm i @groupdocs/groupdocs.merger
click to copy
copied
More examples Documentation

What is GroupDocs.Merger?

GroupDocs.Merger for Python via .NET is a powerful document processing tool that supports over 50 file formats, including PDF, Word, Excel, PowerPoint, Visio, images, and archives. It lets you merge, split, extract, move, swap, and delete pages, improving how you handle documents in your applications.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Merger for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Main features

Explore additional tools available in our document processing solution.

Remove pages from various document types

GroupDocs.Merger supports more than 50 file formats, making document modifications quick and seamless.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English