Questions tagged [closedxml]

ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files.

ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.

ClosedXML provides a object oriented way to manipulate Excel 2007+ (.xlsx, .xlsm, etc) files (similar to VBA) without dealing with the hassles of XML Documents. It can be used by any .NET language like C# and Visual Basic (VB).

Online resources:

615 questions
0
votes
1 answer

Excel export (xlsx) error Exception of type 'System.OutOfMemoryException' was thrown

I am facing System.OutOfMemoryException while exporting .xlsx file from ASP .Net this is happening while writing the data into memory stream. protected void ExportExcel(string strWorkbookName, DataTable dt) { try { dt.TableName =…
Yogi Bear
  • 3
  • 2
  • 9
0
votes
1 answer

How to create drill down table in excel using Closed Xml excel dll in C#?

Here Gross Margin is parent. Below rows are child so i want to have drill down at parent level i.e at Gross margin Is there any way to do this using closedxml excel or do i need to use something else?
S2K
  • 1,185
  • 3
  • 27
  • 55
0
votes
4 answers

C#: Insert into Excel as log file

Is there any specific way to create a log file for my functions. All these functions are as testcases. I am using the below code to add the data. string pathfile = @"data source location"; XLWorkbook workbook = new XLWorkbook(pathfile); IXLWorksheet…
user5338118
0
votes
2 answers

C#: Writing file to Excel issue

I am using ClosedXML to write my data into Excel. But here is the problem. When I write my data the old data gets removed and saves only data which I am calling. I know that is because of "new" and "Add" word I am using. Is there any other way I can…
user5338118
0
votes
0 answers

Create a Pivot table in Excel-2010 with ClosedXML

Using ClosedXML-0.76, I'm trying to create a basic Pivot Table with no luck so far. The code is in PowerShell: # ClosedXML assembly and dependencies Add-Type -Path "path\to\DocumentFormat.OpenXml.2.5\lib\DocumentFormat.OpenXml.dll" Add-Type -Path…
jgran
  • 1,111
  • 2
  • 11
  • 21
0
votes
1 answer

Export GridView using ClosedXML library

I am using GridView on my page markup and I want to export data from MySQL database to excel using asp.net c#, and I am using ClosedXML but the error is : The type or namespace name 'ClosedXML' could not be found (are you missing a using…
Antonio Mailtraq
  • 1,397
  • 5
  • 34
  • 82
0
votes
1 answer

Xamarin and ClosedXML

I have some C# code which was originally written in Visual Studio. I am now trying to make this code run in a Mac, using the Xamarin Studio. I get multiple errors, that have to do with the references: For example, the original code uses a library…
adrCoder
  • 3,145
  • 4
  • 31
  • 56
0
votes
1 answer

ClosedXML TimeSpan Formatting

I am outputting a timespan of value 00:25 into an excel sheet using the following: string.Format("{0}:{1}", Convert.ToInt32(Math.Truncate(shift.MealBreak.TotalHours)).ToString("D2"), shift.MealBreak.Minutes.ToString("D2")); Bit overkill but does…
Mike
  • 618
  • 2
  • 8
  • 27
0
votes
1 answer

closedXML insert subcollection

I'm getting my collection from database var exclCompany = companies.Select(u => new ExcelCompaniesViewModel { Id = u.Id, IsEditedFirstTime = u.IsEditedFirstTime ? "Да" : "Нет", IsLoggedFirstTime = u.IsLoggedFirstTime ? "Да" : "Нет", …
Sergei
  • 21
  • 3
0
votes
1 answer

How to get the value of excel sheet cell using their Field Name

I want to Extract data from Excel sheet according to header i have specifies in the Sheet. I am using ClosedXML and getting data using cell Number.Below is my Code. FileInfo fi = new FileInfo(path1); …
Neeraj Mehta
  • 1,675
  • 2
  • 22
  • 45
0
votes
1 answer

Assembly 'ClosedXML, Version=0.76.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b' uses 'DocumentFormat.OpenXml,

I have updated my asp.net mvc 4 project into mvc 5 by using below mentioned link.But after that it gives below error on ClosedXML dll. Could you tell me how to sort out that issue ? Thanks in advance. How to Upgrade an ASP.NET MVC 4 and Web API…
Sampath
  • 63,341
  • 64
  • 307
  • 441
0
votes
0 answers

Is it possible to use process interoperability (without resorting to COM) to run 64-bit code from a 32-bit executable?

I have found myself in a situation where I've got a 32-bit application that needs to allocate too much memory for the environment (constructing and serializing a very large Excel sheet - 80 columns, 200k rows, 3 sheets via ClosedXml). Whilst I'm…
tobriand
  • 1,095
  • 15
  • 29
0
votes
1 answer

Customize excel sheet's cell background color of open xml in asp.net

I want to set a color of some cells using Asp.Net. Suppose,If my Salary amount is greater than 20000 than that specific cells color will be red,where salary > 20000 .other cell is as well as. I am fetching the full data from database and finally…
Abhisek Das
  • 113
  • 1
  • 3
  • 12
0
votes
0 answers

exported excel file using closedxml is not opening in android

i have exported excel file successfully but problem is that that exported excel file is not getting opened in android, whereas i have seen many applications that export files to excel and same files are getting opened on android, then why not my…
0
votes
0 answers

Error importing pictures into an Excel file using ClosedXML

I have a problem with importing pictures in Excel. I usually use ClosedXML, but it cannot import pictures and first have to be saved in ClosedXML, and open in OpenXML, to insert a picture. As a result, when you open a file, I get an error. "We…
Yermek
  • 23
  • 3