- Demo
- C# source
- VB.Net source
The sample demonstrates how to convert Excel workbook to Image file via Spire.XLS.
using Spire.Xls; namespace ToImage { class Program { static void Main(string[] args) { Workbook workbook = new Workbook(); workbook.LoadFromFile(@"..\..\..\..\Data\parts.xls",ExcelVersion.Version97to2003); Worksheet sheet = workbook.Worksheets[0]; sheet.SaveToImage("sample.bmp"); System.Diagnostics.Process.Start("sample.bmp"); } } }
Imports Spire.Xls Namespace ToImage Friend Class Program Shared Sub Main(ByVal args() As String) Dim workbook As New Workbook() workbook.LoadFromFile("..\..\..\..\Data\parts.xls",ExcelVersion.Version97to2003) Dim sheet As Worksheet = workbook.Worksheets(0) sheet.SaveToImage("sample.bmp") System.Diagnostics.Process.Start("sample.bmp") End Sub End Class End Namespace