Questions tagged [gembox-spreadsheet]

GemBox.Spreadsheet is a .NET component that enables you to read, write, convert, and print spreadsheet files (XLSX, XLS, XLSB, CSV, HTML, and ODS) from .NET applications. With GemBox.Spreadsheet you get a fast and reliable component that’s easy to use and doesn't depend on Microsoft Excel. It requires only .NET and it’s much faster than Microsoft Office Automation!

GemBox.Spreadsheet () is a .NET component that enables developers to read, write, and convert spreadsheet files from their .NET applications.

GemBox.Spreadsheet Free is free of charge while GemBox.Spreadsheet Professional is a commercial version licensed per developer. Server deployment is royalty-free.


Support

Read Read & Write Write
XML XLS, XLT PDF, PDF/A
XLSX, XLTX, XLSM, XLSM XPS
XLSB PNG, JPG, GIF, BMP, TIFF
ODS
CSV, TSV
HTML, MHTML
PRN, TXT

Hello World

C#

// Create a new file.
ExcelFile workbook = new ExcelFile();

// Create a new sheet.
ExcelWorksheet worksheet = workbook.Worksheets.Add("Sheet 1");

// Get cell "A1".
ExcelCell cell = worksheet.Cells["A1"];

// Set cell value to "Hello World".
cell.Value = "Hello World";

// Save as XLSX file.
workbook.Save("Output.xlsx");

VB.NET

' Create a new file.
Dim workbook As New ExcelFile()

' Create a new sheet.
Dim worksheet As ExcelWorksheet = workbook.Worksheets.Add("Sheet 1")

' Get cell "A1".
Dim cell As ExcelCell = worksheet.Cells("A1")

' Set cell value to "Hello World".
cell.Value = "Hello World"

' Save as XLSX file.
workbook.Save("Output.xlsx")

Top Features


System Requirement

  • .NET Framework 3.5 - 4.8
  • .NET Core 3.1 (.NET 5 & 6 for Windows)
  • .NET Standard 2.0 (.NET 5 & 6 for Linux, macOS, Android, iOS, …)

Installation

You can download GemBox.Spreadsheet from NuGet

Or from BugFixes


Resources


Related Tags

115 questions
5
votes
3 answers

I would like a DateTime to be shown as a proper Date, but in the Gembox options I could not find a option to set the format to Date

I'm using an external component called Gembox for creating Excel reports. When exporting a property that's DateTime in C# towards Excel the value is in Excel shown as a number (for instance '-693593'). All other (basic) property types are displayed…
Alex N
  • 51
  • 1
  • 4
4
votes
2 answers

Unable to load shared library 'libHarfBuzzSharp' or one of its dependencies Error when running on linux after upgrading to .NET 6

Posting this here in case it helps someone else. We use GemBox to build Excel reports and PDF's and we run our code on Linux. We've been upgrading our projects to .NET 6 and have just run into this error. Unable to load shared library…
Bug Maker
  • 434
  • 7
  • 20
3
votes
2 answers

Invalid Data Value using Gembox.Spreadsheet extracting to a datatable

I'm using Gembox to try and import Excel data into an app, but I just can't seem to get the ExtractToDataTable method to work as it should. The exception message reads "Invalid Data Value when extracting to DataTable at SourceRowIndex:1 and…
Dani
  • 2,480
  • 3
  • 21
  • 27
3
votes
1 answer

Unable to load .xls file using Gembox in C#

I wanted to load .xls file(Type: 97-2003 spreadsheet) using C#. I am using Gembox library. When I used below command, I encountered "file contains corrupted data." as error. ExcelFile ef = ExcelFile.Load(filepath, XlsxLoadOptions.XlsxDefault); When…
RISHI KHANNA
  • 354
  • 5
  • 23
2
votes
3 answers

Gembox - get address of ExcelCell

We are evaluating Gembox as a replacement for Aspose. I think I am going blind as one thing I cannot do is easily get the address (e.g. "B4") of an ExcelCell. For example, when iterating through the cells, we may encounter an unexpected value and…
MT.
  • 791
  • 5
  • 15
  • 23
2
votes
1 answer

C# Gembox Spreadsheet - Read cell value which references to another excel file

I am working with GemBox Spreadsheet now to read Excel file using C#. In the Excel file, there is cell contains Date value which refers to another excel file. In the C#, at first, I got zero value. Based on the GemBox Retrieving Calculated Values…
2
votes
1 answer

error while loading .xlsx with Gembox.Spreadsheet

I have the following problem : when I try to load an XML based Excel file (.xlsx) and even if I set the LoadOption to XlsxDefault the program throws the error Reading error: file is not a valid OLE2 Compound File.". it don't throw any exceptions if…
Teo Logean
  • 35
  • 5
2
votes
1 answer

Gembox get count of all rows (including blank) of specfic column

I am trying to get count of last used row for a specific column, but was only able to get count of max rows occupied. Test data is shown in attached snap. Please help. Snap Attached Here SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY"); …
user3289968
  • 97
  • 2
  • 12
2
votes
1 answer

Gembox spreadsheet : Is it possible to apply "Convert To Number" for the cells with warning?

I am trying set my formatted datatable to an excel worksheet. Simply : ws.InsertDataTable(myDatatable, new InsertDataTableOptions() { ColumnHeaders = false, StartRow = 5 }); But myDatatable cells contains numeric values mostly. And when I…
Jean
  • 524
  • 4
  • 21
2
votes
3 answers

How to use GemBox.Spreadsheet in OSX if is a .NET Library for .NET Framework

I'm using .NET CORE cause i have a Mac, and i NEED use the GemBox.Spreadsheet, but is only available for .NET Framework. Is it possible to do something in order to use it with .NET CORE? dotnet --version: .NET Command Line Tools…
user5526811
2
votes
1 answer

Create all the rows of a column as a dropdownlist in excel using c#

My requirement is to export a blank excel sheet with 5 columns in which 3rd columns of all rows as a dropdownlist, so that user can use this work sheet to modify the data as per their need. I am using c# to exporting file. I already worked on it…
Arvind
  • 75
  • 2
  • 12
2
votes
1 answer

Printing File Excel using C#

// Display OpenFileDialog by calling ShowDialog method Nullable result = dlg.ShowDialog(); // Get the selected file name and display in a TextBox if (result == true) { string filename = dlg.FileName; xpsFilePath =…
Pshtiwan
  • 39
  • 1
  • 7
2
votes
0 answers

Gembox Spreadsheet Data Validation

I'm having some trouble applying some Data Validation on an Excel file generated "on-the-fly" that I've been unable to solve. I'm using Gembox Spreadsheet version 3.5 (35.3.40.1025). The file is being generated using VB.NET and I'm supposed to, for…
Zed_Blade
  • 1,009
  • 3
  • 18
  • 38
2
votes
1 answer

Gembox Spreadsheet C#: It is a way to detect if a cell has border?

As we know, in Gembox Spreadsheet, you can set a border (with C# language) for a cell like: worksheet.Cells[row, 2].Style.Borders.SetBorders(MultipleBorders.All, Color.FromArgb(252, 1, 1), LineStyle.Thin); It is a way to check if a cell contains…
Snake Eyes
  • 16,287
  • 34
  • 113
  • 221
2
votes
2 answers

GemBox.Spreadsheet last used row

I am trying to get the index of the last used row in a spreadsheet. I've found that in excel it could be done like that: int lastUsedRow = worksheet.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell, Type.Missing).Row; But this doesn't seem…
Apostrofix
  • 2,140
  • 8
  • 44
  • 71
1
2 3 4 5 6 7 8