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
0 answers

Closed XML Responese.End() in C# ASP.net exist the thread

Hello I am exporting an excel file directly from the database and also mailing to the email address. but it executes till the end and Stops at Respone.End() Method it is not solved by removing Response.clear or creating file at the destination…
Digant Jani
  • 83
  • 1
  • 10
0
votes
1 answer

export gridview to excel using closed xml with 1 column apart

I'm exporting gridview to excel using ClosedXML, I want my output to have a one column apart. Like this. This is my code for the gridview header part. for (col = 0; col < headerCount; col++) { …
odlan yer
  • 721
  • 1
  • 7
  • 15
0
votes
1 answer

How can I add symbols to a cell using closedxml?

I am inserting data into a dummy excel. I need to append symbols before texts into some cell. Please let me know how can i achieve this using ClosedXML.
0
votes
1 answer

In ClosedXML, how to sort a worksheet by a column?

In C# using asp/MVC the app generates an Excel .xlsx file based on data thats filled in to the specific columns, works great. But the goal is to provide additional worksheets that use the same columns but sort on specific colums, such as Column "J" …
Brad Rogers
  • 89
  • 2
  • 12
0
votes
1 answer

Exporting data from Grid View to Excel

I am trying to save data from grid view to excel using ClosedXML, although I have managed to do so successfully, but it is saving only a single page of Grid view , how can I save the data of all the pages of grid view?
0
votes
1 answer

C# - ClosedXML make image transparent

I'm using ClosedXML to create an sheet for excel and inserting data in it. My code for this - FileStream fs = new FileStream("C:\\Images\\jcilogo.png", FileMode.Open); byte[] buffer = new byte[fs.Length]; fs.Read(buffer, 0,…
omkar patade
  • 1,442
  • 9
  • 34
  • 66
0
votes
1 answer

Hyperlink in Excel using C#.Net

I am using ClosedXML to generate excel from c# code.I need hyperlink on one particular column with multiple rows and every link is unique. for (int i = 2; i <= result.Count + 1; i++) { ws.Cell(i, 44).Value = "Download"; url = folderPath +…
DSM
  • 46
  • 1
  • 4
0
votes
0 answers

XLWorkbook : hexadecimal value 0x1D is invalid character ' on memory stream saving

I am trying to download an excel file but keep getting hexadecimal value 0x1D is invalid character ' error Please find my code below. public static string GenerateRADownloadExcel(System.Data.DataTable downloadtable,long studyid, out string…
Ayk
  • 1
0
votes
2 answers

Unable to store comma values in a ClosedXML Cell with C#

I am trying to store the value "10,23" in an Excel file using the ClosedXML Library but the value inserted is "1023". The code I have is: XLWorkbook workbook = new XLWorkbook(); IXLWorksheet worksheet =…
Patrick
  • 2,995
  • 14
  • 64
  • 125
0
votes
3 answers

'', hexadecimal value 0x1A, is an invalid character

I am using closedXML to take a datatable and place this into an Excel file. The code I am working with works, with 99% of the files I put through the application, but I get an error with a file every now and then. (no this is not a debugging…
Simon Price
  • 3,011
  • 3
  • 34
  • 98
0
votes
0 answers

ClosedXML excel document reported as corrupted

I'm trying to create an excel spreadsheet with the ClosedXML assembly for some master/detail stuff. I can create the flat master output fine. However, when I went back and started adding on the detail portions, the code runs fine but Excel reports…
Bigsby
  • 952
  • 6
  • 20
0
votes
0 answers

Memory Utilization is becoming high on reading Excel in .NET using closed XML

I have an excel file with 100,000 rows and 20 columns each. I am fetching the records using ClosedXml and then converting it into JSON using Json.Net library. However it seems that my memory consumption is increasing a lot. It shots up by about…
Pratik Bhattacharya
  • 3,596
  • 2
  • 32
  • 60
0
votes
2 answers

Any idea why I'm getting the error "Column number must be between 1 and 16384"?

What my code is trying to accomplish is copying all the cells from one worksheet into another. It is the simple block // find the index of the first empty row and column in the dumped file int m = 1; while ( !wb.Worksheet(3).Cell(m,1).IsEmpty() )…
Subpar Web Dev
  • 3,210
  • 7
  • 21
  • 35
0
votes
1 answer

How to add a new worksheet for every 10000 records in datatable while export to excel using closedxml

my datatable has 100,000 records, i would like to create a new worksheet for every 10,000 records in datatable. how to iterate through datatable to do this. int sheetcount = 1; using (XLWorkbook wb = new XLWorkbook()) { var ws =…
Tan
  • 778
  • 3
  • 18
  • 36
0
votes
1 answer

Xamarin bug with ClosedXML : "system.io.ioexception: operation not valid when package is read-only at system.io.packaging..."

I'm using Xamarin Studio to work on a C# console application. I am working with ClosedXML in order to manipulate data from an excel file. I am getting the error system.io.ioexception: operation not valid when package is read-only at…
TropicalViking
  • 407
  • 2
  • 9
  • 25