HTML JPG PDF XML XLSB
  Product Family
PDF

Convert XLSB to byte array via C#

Native and high performance Microsoft Excel XLSB to byte array conversion or vice versa for spreadsheets data processing using server side .NET APIs.

Byte Array is helpful for data processing or storing. You can convert XLSB file to Byte Array as well as a Byte Array to XLSB document using C# language. In order to convert XLSB to byte array, we’ll use

Aspose.Cells for .NET

API that offers different features for document manipulation and conversion using .NET platform.

How to Convert XLSB to Byte Array via C#

It is easy for the developers to load & convert XLSB files to byte array for further manipulation tasks in just a few lines of code.

  1. Include the namespace in your class file
  2. Load input XLSB File using Workbook
  3. Initialize MemoryStream object
  4. Convert stream data to byte array
  5. Process data as of your requirement

System Requirements

Just make sure that system have Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms as well as development environment like Microsoft Visual Studio.

  • Install from command line as nuget install Aspose.Cells or via Package Manager Console of Visual Studio with Install-Package Aspose.Cells.
  • Alternatively, get the offline MSI installer or all DLLs in a ZIP file from downloads
 

This sample code shows XLSB to byte array C# Conversion

Workbook workbook = new Workbook("sourceFile.xlsb");

//Save the workbook in memory stream
MemoryStream ms = new MemoryStream();

workbook.Save(ms, SaveFormat.Xlsb);

//Read bytes from memory stream
byte[] byte_array = new byte[ms.Length];
ms.Read(byte_array, 0, byte_array.Length);

// Process the memory stream byte array data as of your requirement 
 
An Excel Spreadsheet Programming Library capable of building cross-platform applications with the ability to generate, modify, convert, render and print all Excel files. .NET Excel API not only convert between spreadsheet formats, it can also render Excel files including XLSB as images, PDF, HTML, ODS and more, thus making it a perfect choice to exchange documents in industry-standard formats.

XLSB What is XLSB File Format?

XLSB file format specifies the Excel Binary File Format, which is a collection of records and structures that specify Excel workbook content. The content can include unstructured or semi-structured tables of numbers, text, or both numbers and text, formulas, external data connections, charts and images. Unlike XLSX (which is based on Open XML file format), the XLSB represents binary Excel workbook file. XLSB files can be read and written to faster which makes them useful for working with large files. XLSB is seldom used to store workbooks as XLSX (and previously XLS) are the most common user selected file formats for saving workbooks. It can be opened by Microsoft Office 2007 and above.

Read More

Other Supported Conversions

You can also convert other file formats into byte array or vice versa including few listed below.

XLS To Byte Array (Microsoft Excel Spreadsheet (Legacy))
XLSX To Byte Array (Open XML Workbook)
XLSB To Byte Array (Excel Binary Workbook)
XLSM To Byte Array (Macro-enabled Spreadsheet)
XLT To Byte Array (Excel 97 - 2003 Template)
XLTX To Byte Array (Excel Template)
XLTM To Byte Array (Excel Macro-Enabled Template)
CSV To Byte Array (Comma Seperated Values)
TSV To Byte Array (Tab Seperated Values)
ODS To Byte Array (OpenDocument Spreadsheet)
XLS To PDF (Portable Document Format)
XLS To HTML (Hyper Text Markup Language)
XLSX To XPS (Microsoft Excel OOXML Excel File)
XLSX To HTML (OOXML Excel File)
XLSX To SVG (Scalable Vector Graphics)
XLS To JPEG (JPEG Image)