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
1
vote
2 answers

GemBox Retrieving Calculated Values From a Spreadsheet or Flexcel

According to their docs: GemBox.Spreadsheet can read and write formulas, but can not calculate formula results. When you open a XLS file in MS Excel, formula results will be calculated automaticaly. So if i create a spreadsheet with some injected…
Tom
  • 73
  • 1
  • 8
1
vote
2 answers

How to apply excel formulas in gembox.Spreadsheet

I want to apply this formula to all C3 cells excluding header '=IF(ISBLANK(B3), "", 10)' to my spreadsheet. How can I achieve that?
1
vote
1 answer

Merge multiple Excel sheets into one sheet

I'm using GemBox.Spreadsheet to process some Excel files, now I need to combine them into one file with one sheet. I know how to do sheets copying, but that will result in multiple sheets. What I need is a single output sheet that will contain all…
1
vote
2 answers

Update Chart data in PowerPoint

I am creating PowerPoint by loading template and updating the data and saving as a new copy. I am using GemBox.Presentation and GemBox.SpreadSheet for that. I can access the chart data using spreadsheet however I am not sure how to update it. Here…
1
vote
1 answer

Convert Excel to PDF with sheet names as bookmarks

I want to save all sheets from my Excel file to a PDF. Currently, I'm using GemBox.Spreadsheet for this: var workbook = ExcelFile.Load("file.xlsx"); var options = new PdfSaveOptions() { SelectionType = SelectionType.EntireFile…
bellpatricia
  • 39
  • 10
1
vote
1 answer

Copying cell range with images in Excel files

I'm copying cells from one Excel sheet into another with GemBox.Spreadsheet. The cells are coming from a specific named range and I'm using CellRange.CopyTo method like this: ExcelFile book = ExcelFile.Load("sv-data.xlsx"); ExcelWorksheet sheet1 =…
1
vote
1 answer

Does GemBox support column filters?

If I load an xlsx file that already has a filter, and then save the file using GemBox, it seems to throw my filtering cell away. Does GemBox support filtering at all? I know I can load the file in preserved mode but my intention is to create the…
Corpsekicker
  • 3,276
  • 6
  • 25
  • 34
1
vote
2 answers

Why does Gembox spreadsheet crash when calling Excelfile.save: FileNotFoundException Could not load file or assembly System.Security.Permissions

I am using Gembox to open, modify and save a xlsx file. Calling Save on the Excelfile causes a System.IO.FileNotFoundException. The problem happens with our company serial key and with the free key. Sample Code using GemBox.Spreadsheet; namespace…
nomiso1183
  • 33
  • 5
1
vote
1 answer

C# GemBox-SpreadSheet Right To Left

I'm using a C# WebApi 2, stored on Azure server without office installed. I need to create an excel file, and know that GemBox Spreadsheet does not require office to be installed on the machine. The issue is that I need the file to be right to left,…
Erez Konforti
  • 243
  • 5
  • 19
1
vote
1 answer

Gembox Excel send directly to Printer

I have made a web application where i can write out reports in Excel, using the Gemboxs features. Using this Example: Gembox Example Now i would like to send it directly to the Printer, which is connected to the server the web application is running…
J. Doe
  • 13
  • 2
1
vote
1 answer

Save XLSX file as PDF .NET Core (GemBox)

GemBox just released .NET Core version of their spreadsheet reading and writing software. I can successfully build and export spreadsheets as expected. However, when saving as PDF, I get the error: 'SaveOptions.PdfDefault' is obsolete: 'PDF saving…
cbrawl
  • 875
  • 1
  • 9
  • 24
1
vote
1 answer

Gembox LoadXls IndexOutOfRangeException

I'm using LoadXls to upload a file from a stream and I get the following error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds…
moondaisy
  • 4,303
  • 6
  • 41
  • 70
1
vote
1 answer

gembox.spreadsheet date gets converted to int

I am loading an Excel 97-2003 XLS file into C# using GemBox.Spreadsheet version 39.3.30.1202. One cell has the value 13-01-2017 (Formatted: 20170113) and the datatype "Date" with custom formatting "YYYYMMDD". After Gembox.Load(new XlsLoadOptions( )…
1
vote
1 answer

MVC/WebApi Stream from HTTPPostedFileBase

I am trying to a pass a stream from a HttpPostedFileBase to a service method without saving to disk. //Controller Action [HttpPost] public void Import() { if (Request.Files.Count == 0) return new…
1
vote
4 answers

Excel cannot open Gembox Spreadsheet file

I have this code to generate an Excel file and download it: SpreadsheetInfo.SetLicense("mycode"); ExcelFile myExcelFile = new ExcelFile(); ExcelWorksheet ws = myExcelFile.Worksheets.Add("Page 1"); myExcelFile.Save(Response, "asd.xlsx"); //this is…
jason
  • 6,962
  • 36
  • 117
  • 198