This way of protect did not work for me.
Here is my code snippet:
_wb = new XLWorkbook();
var ws =_wb.Worksheets.Add(finalDataTable, "Data Export");
ws.Protect("passw0rd!");
var path = ExportFilePath;
_wb.SaveAs(path);
After saving the workbook when I open the spreadsheet, it just opens up without any password prompt.
↧
New Comment on "Sheet Protection"
↧
New Post: Is it possible to change text orientation?
Hi people,
ClosedXML is really the real deal, but i'm having some trouble to change orientation of a cell text. 90 degrees is what I need, but i'm not seeing how. Is there a way to do that?
Best Regards.
ClosedXML is really the real deal, but i'm having some trouble to change orientation of a cell text. 90 degrees is what I need, but i'm not seeing how. Is there a way to do that?
Best Regards.
↧
↧
New Post: Is it possible to change text orientation?
↧
New Post: OpenXML, OutOfMemory with large report.
Hello, faced with the problem:
WebSite (ASP.Net, MVC 3 +ClosedXML), When building a large report (~250K rows, 30 columns), I receive an error "System.Out Of Memory". Is there a way to prevent this error?
WebSite (ASP.Net, MVC 3 +ClosedXML), When building a large report (~250K rows, 30 columns), I receive an error "System.Out Of Memory". Is there a way to prevent this error?
↧
New Post: OpenXML, OutOfMemory with large report.
I understand that for 250K lines of the report too much, but it is a requirement of the customer to a specific report.
↧
↧
New Post: Normal Style
Is it possible to modify the "normal" style under the styles block in excel?
I know you can set and change the default style, but we need to modify the "normal" style.
Example:
If I open excel the default and normal style is set to font size 8.
If I create a new excel file using ClosedXML I set the style to font size 8, but then the default is font size 8 and the normal style is font size 11.
I know you can set and change the default style, but we need to modify the "normal" style.
Example:
If I open excel the default and normal style is set to font size 8.
If I create a new excel file using ClosedXML I set the style to font size 8, but then the default is font size 8 and the normal style is font size 11.
↧
New Post: File size increase when updating a file
I have a file that its original size is 68KB, using ClosedXML to open and update two fields the file size jumps to 1007KB.
My problem is that if im updating circa 500 rows in a spreadsheet what will the file size be after this and is there a way that I can avoid such a massive jump in file size.
My problem is that if im updating circa 500 rows in a spreadsheet what will the file size be after this and is there a way that I can avoid such a massive jump in file size.
↧
New Post: ConditionalFormatting StopIfTrue / Priority
Can Please share the code, which support StopIfTrue property
↧
New Post: Mac / Numbers can't read generated file
I'm using ClosedXML to create and download .xlsx files on the fly from my asp.net (c#) webform application. All is well if I use Excel in Windows to read the file but that same file isn't read by Numbers on a Mac. It just opens an empty document with no sheets. A couple of interesting points:
Any ideas or workarounds?
-
If I download the file to a Windows machine, open it, re-save it, then copy to the mac, Numbers will read it fine.
-
If I just copy the Windows downloaded file over to the mac without re-saving it, an empty file is shown. No errors other than a font warning are shown by Numbers.
Any ideas or workarounds?
↧
↧
New Post: Any easy way to format a particular column to be 'number' instead of 'text' when converting a dataset into xls ?
static void CreateExcelFromDataTable(DataTable dtExcel, string spName)
{
XLWorkbook wb = new XLWorkbook();
wb.Worksheets.Add(dtExcel, "dtExcel");
string fileName = "ExcelFiles/" + spName + "_" + DateTime.Now.ToString("MM.dd.yyyy") + ".xlsx";
wb.SaveAs(fileName.Replace("usp_", ""));
}
This works but for a particular column I need it to be formatted as 'number' when converted .. Any ideas ? ↧
New Post: File size increase when updating a file
I have the same problem. Any solution?
↧
Created Unassigned: Closed XML Formatting Issue [9496]
When I cloned a copy of excel I have cells with no formatting means it's just plain white cells without any borders.
But once I save the excel using C# workbook.save() some weird lines appear

Please suggest any solution to this.
TIA
But once I save the excel using C# workbook.save() some weird lines appear

Please suggest any solution to this.
TIA
↧
New Comment on "Hide Unhide Row(s)/Column(s)"
@Alavudeen_soft Did you get any answer for this?
↧
↧
New Comment on "Pivot Table example"
Hi, I am creating a Pivot Table, and I want to put the resulting table in a tabular form to show the row labels instead of the legend "row labels" and so with the columns.
I have tried with the pivotTable.SetLayout(XLPivotLayout.Tabular);
and also doing the same with each row label and each row column, but nothing seems to be working, is there something I am missing?
↧
New Comment on "How do I deliver an Excel file in ASP.NET?"
HttpResponse httpResponse = Response; Error: cannot implicitly convert type 'system.web.httpResponseBase' to 'System.Web.HttpResponse' so this will not work at all. I had to change it to: HttpResponse httpResponse = HttpContext.ApplicationInstance.Response;
↧
Created Unassigned: Datetime is 1 day off [9497]
Greetings,
I'm trying to write a datetime to a cell using ClosedXML. I set the IXLCell DataType to be XLCellValues.DateTime, and the value to be a new DateTime. I also set the number format id to 14.
When I look at the excel sheet, the date displayed is always one day larger than anticipated. When I read the cell value using ClosedXML (in a unit test), the value read from the file matches the value I wrote, but the actual excel sheet does not show the correct value.
Is this a bug in ClosedXML or am I missing something?
Thanks!
-Adam
I'm trying to write a datetime to a cell using ClosedXML. I set the IXLCell DataType to be XLCellValues.DateTime, and the value to be a new DateTime. I also set the number format id to 14.
When I look at the excel sheet, the date displayed is always one day larger than anticipated. When I read the cell value using ClosedXML (in a unit test), the value read from the file matches the value I wrote, but the actual excel sheet does not show the correct value.
Is this a bug in ClosedXML or am I missing something?
Thanks!
-Adam
↧
Edited Unassigned: Datetime is 1 day off [9497]
Greetings,
I'm trying to write a datetime to a cell using ClosedXML. I set the IXLCell DataType to be XLCellValues.DateTime, and the value to be a new DateTime. I also set the number format id to 14 (mm/dd/yyyy)
When I look at the excel sheet, the date displayed is always one day larger than anticipated. When I read the cell value using ClosedXML (in a unit test), the value read from the file matches the value I wrote, but the actual excel sheet does not show the correct value.
Is this a bug in ClosedXML or am I missing something?
Thanks!
-Adam
I'm trying to write a datetime to a cell using ClosedXML. I set the IXLCell DataType to be XLCellValues.DateTime, and the value to be a new DateTime. I also set the number format id to 14 (mm/dd/yyyy)
When I look at the excel sheet, the date displayed is always one day larger than anticipated. When I read the cell value using ClosedXML (in a unit test), the value read from the file matches the value I wrote, but the actual excel sheet does not show the correct value.
Is this a bug in ClosedXML or am I missing something?
Thanks!
-Adam
↧
↧
New Post: DateTime is one day off
Greetings,
I'm trying to write a datetime to a cell using ClosedXML. I set the IXLCell DataType to be XLCellValues.DateTime, and the value to be a new DateTime. I also set the number format id to 14 (mm/dd/yyyy)
When I look at the excel sheet, the date displayed is always one day larger than anticipated. When I read the cell value using ClosedXML (in a unit test), the value read from the file matches the value I wrote, but the actual excel sheet does not show the correct value.
Is this a bug in ClosedXML or am I missing something?
Thanks!
-Adam
I'm trying to write a datetime to a cell using ClosedXML. I set the IXLCell DataType to be XLCellValues.DateTime, and the value to be a new DateTime. I also set the number format id to 14 (mm/dd/yyyy)
When I look at the excel sheet, the date displayed is always one day larger than anticipated. When I read the cell value using ClosedXML (in a unit test), the value read from the file matches the value I wrote, but the actual excel sheet does not show the correct value.
Is this a bug in ClosedXML or am I missing something?
Thanks!
-Adam
↧
Reviewed: ClosedXML 0.76.0 (Aug 01, 2016)
Rated 5 Stars (out of 5) - Excellent tool, prefectly works...
↧
New Post: Custom DataValidation
Hello
I try to used the custom datavalidation
var validate = worksheet.Column(count).AsRange().SetDataValidation();
validate.Custom("###+###");
where "###+###" is string an d # is a number (exemple : (111+222 or 147+258)
Unfortunately, nothing work
Can you help me?
I try to used the custom datavalidation
var validate = worksheet.Column(count).AsRange().SetDataValidation();
validate.Custom("###+###");
where "###+###" is string an d # is a number (exemple : (111+222 or 147+258)
Unfortunately, nothing work
Can you help me?
↧