Guide for VB.NET
Core Document Formats
Additional Features

VB.NET Excel - How to Delete Spreadsheet

VB.NET Guide for Deleting Spreadsheet from Microsoft Excel Doc

VB.NET
Home > .NET Imaging SDK > VB.NET > Delete Document Page (Worksheet)
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

VB.NET developers may find it necessary to delete spreadsheet(s) from certain Excel document in some situations. Our VB.NET Excel Processing SDK is often used by developers to delete unwanted spreadsheet(s) from target Microsoft Excel file in VB.NET applications. And we provides user guide of this VB.NET SDK here to help you remove unnecessary Excel spreadsheet(s). When reading the guide, you will know answers to the following questions.
Related .net document control helps:
asp.net annotate pdf: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
asp.net multipage tiff viewer: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net edit pdf text: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net pdf viewer: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
  • What DLLs will be added to your VB.NET project references in order to delete spreadsheet(s) from your Excel file?
  • Do you know the APIs to be used to delete worksheet(s) from target Excel document in VB.NET application?
  • How can you use the VB.NET sample code to remove Excel document spreadsheet(s) through VB.NET programming?
  • Apart from deleting Excel spreadsheet(s), are there some other functions of this VB.NET Excel Processing SDK?
Before using our VB.NET Excel Processing SDK to delete spreadsheet(s) from target Excel document, you may need to make some preparations. For example, you may need to install .NET Framework 2.0 or later versions. Besides, Visual Studio version 2005, 2008, 2010 or 2012 is required. Finally, an important thing is to make sure that your Excel document is with .xlsx Excel file extension.
DLLs to Remove Excel Worksheet
To use our VB.NET Excel Processing SDK to delete unwanted spreadsheet(s) from target Excel document, you just need to add RasterEdge.Imaging.Basic.dll and RasterEdge.Imaging.MSExcel.dll to your project as references. Then, you are able to call required API to remove unnecessary Excel document spreadsheet(s) in your VB.NET program.
API to Delete Excel Spreadsheet
The following APIs can be used to delete certain spreadsheet(s) from your Excel document in your VB.NET project. Generally, you can directly use DeletePage method to remove spreadsheet(s) and you can specify which spreadsheet(s) to be removed by setting the value of pageIdx. For instance, you are able to set to pageIdx value to 4 in order to remove the fifth spreadsheet from the Excel document. Note: the pageIdx in our program starts from 0.
Private Sub DeletePage(pageIdx As Integer) Implements XLSXDocument.DeletePage
End Sub
VB.NET Sample Code
Developers are free to use VB.NET demo below in your program to delete unnecessary spreadsheet(s) from the source Excel document file.
''' <summary>
''' Delete pages in Excel document
''' </summary>
''' <param name="filePath"></param>
''' <param name="pageIndx"></param>
Public Sub DeletePage(filePath As [String], pageIndx As Integer)
Dim doc As New XLSXDocument(filePath)
doc.DeletePage(pageIndx)
End Sub
Note: RasterEdge uses XLSXDocument as an abstraction of your Excel document in programming level and XLSXPage is used to represent one Excel document spreadsheet. Your source Excel document can be loaded from local file or memory stream to build an XLSXDocument object in VB.NET application.
Other Functions in VB.NET
Apart from removing unnecessary spreadsheet(s) from source Excel document, our VB.NET Excel Processing SDK also supports many other Excel page processing implementations in VB.NET application. View the following sections to know more details.

Insert Blank Excel Page

Sometimes, you may want to delete unnecessary spreadsheet(s) from an Excel document. But in some cases, you may need to insert worksheet(s) in your Excel document file. This VB.NET Excel Processing SDK also has a function that enables you to insert blank worksheet to any location of your Excel document by using a few lines of VB.NET code.

Add Image to Excel Worksheet

This VB.NET Excel Processing SDK is a good choice if you want to add an image to your Excel document worksheet at specified location through VB.NET programming. The added image can be in various formats, such as PNG, BMP, JPEG and so on.

Split Excel Document

Developers can easily split or divide an Excel file into two sub-documents in VB.NET project with this advanced and mature Excel Processing Library for VB.NET.
This VB.NET page mainly illustrates how to delete spreadsheet(s) from Excel document in VB.NET application. You can also create a C#.NET project to delete Excel document worksheet(s) by using our .NET Excel Processing Control.


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com