GroupDocs.Merger for Node.js via Java

Remove pages from XLSX

GroupDocs.Merger for Node.js via Java enhances Node.js apps with powerful document processing features, including page removal from XLSX files.

How to remove pages from XLSX

GroupDocs.Merger makes it easy to delete pages from XLSX documents. Integrate it into your Node.js via Java applications to enhance document management capabilities.

  1. Specify the path to the XLSX file.
  2. Set the page numbers you want to remove.
  3. Run the page removal operation.
  4. Save the updated document.
const mergerLib = require('@groupdocs/groupdocs.merger')

// Create a Merger instance and provide the file path
const merger = new mergerLib.Merger("document.xlsx")

// Define the page number(s) to be removed
const removeOptions = new mergerLib.RemoveOptions(2, 2)

// Apply the removal settings
merger.removePages(removeOptions)

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

Advanced document management

GroupDocs.Merger for Node.js via Java provides a complete set of tools for working with over 50 widely used file formats, making document processing easier and more efficient.

Key capabilities of GroupDocs.Merger

Merge multiple file formats

Combine PDFs, Word documents, spreadsheets, presentations, images, and archives with customizable merging options for precise results.

Flexible page management

Rearrange document pages by moving, swapping, or deleting them to keep your files well-organized.

Customize page layout

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

Extract pages as separate files

Select and save specific pages as standalone documents.

Remove all even-numbered pages

Learn how to delete even-numbered pages from a XLSX document.

JavaScript

const mergerLib = require('@groupdocs/groupdocs.merger')

// Provide the file path to the constructor
const merger = new mergerLib.Merger("document.xlsx");

// Get the total number of pages in the document
const info = merger.getDocumentInfo()
const lastPage = info.getPageCount()

// Configure settings to remove even pages
const rangeMode = mergerLib.RangeMode.EvenPages
const removeOptions = new mergerLib.RemoveOptions(1, lastPage, rangeMode)

// Process the document
merger.removePages(removeOptions)

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

What is GroupDocs.Merger?

GroupDocs.Merger for Node.js via Java is a feature-rich document processing tool that supports over 50 file formats, including PDF, Word, Excel, PowerPoint, Visio, images, and archives. It offers merging, splitting, extracting, moving, swapping, and deleting pages to streamline document management 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.

Key features

Discover additional capabilities of our document processing solution.

Remove pages from various document formats

GroupDocs.Merger supports over 50 file formats, allowing you to modify documents quickly and effortlessly.

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