Guide for VB.NET
Core Document Formats
Excel to TIFF
Additional Features

VB.NET Excel - Excel to TIFF Rendering

Convert Excel to TIFF File Within VB.NET TIFF Converting Program

VB.NET
Home > .NET Imaging SDK > VB.NET > Excel to TIFF
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

Have you ever thought how to convert Excel to TIFF images to protect the information in your Excel files by using a reliable and comprehensive Excel converting toolkit within VB.NET application? Or how to render and export Excel document to TIFF file in batch conversion mode with some free VB.NET sample codes? Here is solution - RasterEdge .NET Excel to TIFF Converting Library for VB.NET program.
Related .net document control helps:
asp.net view tiff images: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net pdf document viewer c#: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
c# asp.net dicom viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net sharepoint document viewer open source: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
asp.net document viewer open source: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS...
asp.net edit pdf text using c#: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
c# asp.net image viewer: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
By using this VB.NET Excel to TIFF conversion tool of RasterEdge DocImage SDK for .NET, users are able to get well informed of following tutorials for Excel converting and rendering:
  • Brief and precise explanations for why should you convert Excel to TIFF format
  • How to convert single or large volumes of Excel pages to single-page or multi-page TIFF file(s) within VB.NET class (if you are familiar with RasterEdge product, you will see each spreadsheet of Excel or page of Word page is called page)
Why Convert Excel to TIFF
TIFF, is a popular file format for saving high color-depth images and widely used among graphic artists and the publishing industry. TIFF is very popular on scanning, faxing, optical character recognition and other applications for its great stability against altering.
And Excel is the mostly used Microsoft Office software to handle and process large amount of data but it is easy to be altered. Sometimes, if the information contained in the Excel needs to be encrypted, it will be necessary for us to convert Excel to images, for instance, VB.NET Excel to TIFF file in this page.
Users still can find more guides on Excel converting component in VB.NET, such as, VB.NET Excel to raster images converter, VB.NET Excel to PDF document rendering and how to set or customize Excel converting option in VB.NET.
How to Convert Excel to TIFF
In this page, users can find the free demo APIs, methods and sample VB.NET codes on how to render and convert Excel file to TIFF format within VB.NET application. But before you implement this Excel to TIFF conversion application, you need to be sure that your .NET Framework is 2.0 or any greater version and Visual Studio is 2005 or any later version, as well we the Microsoft Office Excel is in version 2007 or any later. If you need the most comprehensive overview on VB.NET Excel converter add-on, please go to the online tutorial.

Conversion APIs

Following list of APIs are for rendering and converting Excel to TIFF file in VB.NET programming. You can separate them into two glossaries: one is rendering Excel document to REImage and the other one is converting and saving rendered image to any supported file format (supported converting image & document files are: TIFF, JPEG, PNG, GIF, BMP, SVG, and PDF ).
' Render Excel to get a REImage collection, or choose specific page to render
Private Function GetPage(pageIndex As Integer) As BasePage Implements XLSXDocument.GetPage
End Function
Private Function toImage() As BaseImage Implements XLSXPage.toImage
End Function
Private Function toImage(height As Integer, width As Integer) As BaseImage Implements XLSXPage.toImage
End Function
'Render Excel to desired document image format 
Private Sub SaveImageFile(image As REImage, filePath As [String]) Implements REFile.SaveImageFile
End Sub
For the above APIs and methods, there are some instructions need to be known:
  • XLSXDocument: in every VB.NET Excel reading or processing project, the uploaded Excel file will transformed into XLSXDocument, which is an abstract and at high level, which containing all information of the loaded Excel document
  • XLSXPage: belongs to "XLSXDocument", and stands for the individual page/sheet of XLSXDocument in VB.NET programming
  • REImage: the default image file format defined in all the RasterEdge products. If you want to view or edit PDF, Word, Excel or PPT document, you need to render each document page into REImage in your VB.NET project as an intermediate.

Example Codes

Corresponding to the above rendering and converting APIs, following two parts of sample Visual Basic codes are for Excel to TIFF rendering and converting in VB.NET program.
Check following VB.NET sample code to render a certain or the entire Excel document pages to single REImage or REImage collection.
''' <summary>
''' Render XLSXDocument to REImage with XLSXDocument and XLSXPage
''' </summary>
''' <param name="ExcelFilePath"></param>
''' <returns></returns>
Public Function RenderXLSXDocumentToREImage(ExcelFilePath As [String]) As List(Of REImage)
Dim buffer As New List(Of REImage)()
Dim doc As New XLSXDocument(ExcelFilePath)
For i As Integer = 0 To doc.GetPageCount() - 1
' Need to convert BasePage to XLSXPage
Dim page As XLSXPage = DirectCast(doc.GetPage(i), XLSXPage)

Dim temp As REImage = DirectCast(page.ToImage(), REImage)
If temp IsNot Nothing Then
buffer.Add(temp)
End If
Next

Return buffer

End Function
After finishing rendering Excel document to REImage, you can just copy following VB.NET code to your project to convert the transformed image to TIFF file.
''' <summary>
''' Render XLSXDocument to images of TIFF format
''' </summary>
''' <param name="ExcelFilePath"></param>
''' <returns></returns>
Public Function RenderXLSXDocumentToTIFF(ExcelFilePath As [String]) As List(Of Stream)

' a list of stream which contains the image data of the TIFF image.
Dim buffer As New List(Of Stream)()

Dim doc As New XLSXDocument(ExcelFilePath)
For i As Integer = 0 To doc.GetPageCount() - 1
Dim page As XLSXPage = DirectCast(doc.GetPage(i), XLSXPage)

Dim temp As REImage = DirectCast(page.ToImage(), REImage)
Dim imageStream As New MemoryStream()
If temp IsNot Nothing Then
temp.Convert(imageStream, ImageFormat.Tiff)
buffer.Add(imageStream)

End If
Next

Return buffer

End Function


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