Questions tagged [closedxml]
ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files.
closedxml
633
questions
0
votes
1
answer
70
views
FileContentResult return - 2 different controller methods, different result
I am using ASP.NET Core and ClosedXML to generate an Excel export.
Export Method 1
Here is the controller method that DOES return an .xlsx file to the browser. The method gets called from a .cshtml ...
0
votes
1
answer
24
views
ClosedXML (Ver 0.102.2): Setting horizontal alignment not working
I am trying to set horizontal alignment of cells when exporting data to excel. Cells with numbers should align right.
What I did:
First creating the table:
var table = CurrentWorksheet.Range(1, 1, ...
0
votes
0
answers
31
views
Read data from the table, find the necessary user variable, and display it on the screen. ClosedXML
I'm still quite new to programming and I started with C#. I want to make a simple application that accepts an error number from the user, for example: "F_220". Read data from the table, find ...
0
votes
2
answers
29
views
Why is this code with ClosedXML not working: BC32023 Expression is of type 'IXLRow', which is not a collection type
I have tried my own brain and severail AI tools but somehow this code with ClosedXML generates an error:
BC32023 Expression is of type 'IXLRow', which is not a collection type.
For Each cell As ...
0
votes
0
answers
33
views
Issue with Adding Comments to Excel Cells using ClosedXML 0.102.2
I'm trying to add comments to specific cells in an Excel file using the ClosedXML library (version 0.102.2) in my C# project. However, when I open the generated Excel file, I encounter the following ...
0
votes
0
answers
17
views
Add blank option to dropdown cell in closedxml
I am creating a dropdown in closedxml using c# by doing the following:
List<string> supplyOptions = new List<string> { " ", "TRUE", "FALSE" };
...
0
votes
0
answers
20
views
ClosedXML add at (@) symbol at formulas [duplicate]
I have to edit an excel file with C#, I am using ClosedXML library. I have the following formula in my C# code.
string fxRateFormula = $"=IFERROR(INDEX('Control Tab'!$E$2:$E$157,MATCH($B5&&...
0
votes
0
answers
28
views
reading excel file not working on web-server using ClosedXML
I have an application where I open an excel file and populate a listbox with the headers. I am using ClosedXML and have the ClosedXML NetGet Package installed and just tried the ClosedXML.Signed ...
0
votes
1
answer
123
views
How to download an Excel file from ClosedXML in ASP.NET
I'm working on an ASP.NET webforms app, and I want to generate Excel files using ClosedXML from data that I retrieve from a database. So far, I've tried the example which should save the file to the C:...
1
vote
2
answers
60
views
Convert var to int with ClosedXml in C#
I want to convert my var in a cell to an int, I know it is an int because I know that this column in my .xlsx file is full of int, but Convert.ToInt32() makes an error;
I did:
var km = feuille.Cell(&...
0
votes
1
answer
20
views
Change Background-Color of portion of Text with Closedxml in Excel
Is there a way to change the background-color of a part of the text inside a cell? im aware of the richttext functions to change text-stylings but could no find anything for the background-color.
I ...
0
votes
2
answers
124
views
How to do AutoFill in Excel with OpenXml or ClosedXml?
In our organisation, people use an Excel spreadsheet with tabular data and a few formulas, which I need to connect to a data provider in C#. With OpenXML, or even better, ClosedXml, we can create or ...
0
votes
0
answers
38
views
Extracting Data from Excel Cells Derived from Complex Calculations Across Multiple Sheets
I'm encountering a challenge in extracting data from an Excel cell that derives its value from complex calculations spanning multiple sheets. The data source involves calculated fields from various ...
1
vote
1
answer
70
views
Adding a predefined cell style in ClosedXml
Excel comes with a number of predefined cell styles such as Good, Note and Heading 3, as shown in the Cell Styles popup below.
Is there a way to assign these cell styles to a range of cells in ...
0
votes
1
answer
48
views
ClosedXML insertData(List<Double>, True) results in only the first row as a Number while rest of the rows as general
I am using ClosedXML to handle exporting data from an addin to an excel file.
I first get my data as List and convert it to List:
List<double> columnData_lst = curr_data_woHdrs_lst[colIndex]...