Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all 1877 articles
Browse latest View live

New Post: Excel cannot open file because the file format or file extension is not valid.

$
0
0
I'm glad you're up and running :)

New Post: How to bold specific text inside a cell and delete some html tags after bolding

Created Unassigned: Slow performance of IXLRow.InsertRowsAbove() / InsertRowsBelow() [9011]

$
0
0
Inserting lots of rows gets disproportionately slower the more rows you insert.

worksheet.Rows(1).InsertRowsBelow(1000); - OK
worksheet.Rows(1).InsertRowsBelow(10000); - Slow
worksheet.Rows(1).InsertRowsBelow(100000); - I gave up waiting...

It looks like there is a hash collision with RangeShiftedRowsDelegate / RangeShiftedColumnsDelegate. One of these delegates is created for each row, but each delegate object returns the same value of .GetHashCode().

When XLRangeBase.Dispose() is called, it removes the delegates for the 10000 rows just created one by one. The MulticastDelegate therefore has to search through all items one-by-one (because they are all in the same hash bucket). As this is done row by row, the performance is proportional to the square of the number of rows (it has to search ( 10000 * 10000 / 2 ) items to do all the removals).

I'm working on a fix (involving changing from delegates to a HashSet of the objects involved) so a patch may be available later.

New Post: Downloading the generated file instead of saving

$
0
0
Is there a way of downloading the generated Excel file instead of saving it somewhere? i.e. as soon as a user clicks the link to generate the Excel file it prompts for it to be downloaded? The user can save it to wherever they want

New Post: Downloading the generated file instead of saving

$
0
0
Found it! In case anyone else wondered
HttpContext.Current.Response.Clear()
        HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
        HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=AddingDataSet.xlsx")

        Using memoryStream As New MemoryStream()
            workbook.SaveAs(memoryStream)
            memoryStream.WriteTo(HttpContext.Current.Response.OutputStream)
            memoryStream.Close()
        End Using

        HttpContext.Current.Response.[End]()

New Post: How to bold specific text inside a cell and delete some html tags after bolding

$
0
0
Get the latest source code. This hasn't been released yet.

New Post: How to bold specific text inside a cell and delete some html tags after bolding

$
0
0
i see so i have to change the code by myself.. I hope youll release the version who has that issue patch.

anyway. thanks for the library it woks great. keep it up!

New Post: How to bold specific text inside a cell and delete some html tags after bolding

$
0
0
You don't have to change the code. Just download the source code, open it in Visual Studio and build it. No change required.

New Post: Conditional Formatting: Color Row

$
0
0
Thank you for the reply. I have taken a look at these examples and more that I found on google, but I still have the same problem.
All I find is how to color a cell, not a row. Isn't it possible?

New Post: Conditional Formatting: Color Row

$
0
0
I finally found a solution.
The example for "Using Formulas" induced me to error.

If I use .WhenEquals() doesn't work, I have to use .WhenIsTrue()

Here is how I color a row from A to N depending on the value of M column:
ws.Range("A1:N100").AddConditionalFormat().WhenIsTrue("=$M1=\"Hello\"").Fill.SetBackgroundColor(XLColor.Gray);
And here is how it is shown on Excel:
Image

It works correctly.
Thanks.

New Post: Pivot table values

$
0
0
I have tried your example on pivot tables and it works fine. My question is how do you get the other types of values on the pivot tables beside the Add? Lets say one wants the Count of items under values or the Average of items.

New Post: same folder hyperlink not work.

$
0
0
Hi,

In visual basic 2010 don't work


ws.Cell(2, 1).Value = "Imagen1.jpg"

ws.Cell( 2, 1).Hyperlink = New XLHyperlink("Imagen1.jpg")


I need to link a image localized in same folder.

Now the link try to open a references in the cell in the worksheet.


HELP ME! PLEASE!


THANKS!

New Post: Row Height is not proper

$
0
0
Dear MDeLeon
       I am using closed xml 0.66.0.0 for Excel generation, once after the excel generated the row height is not aligned properly. 

      I had tried "Adjust to contents" property, But no use.

      How to resolve this issue ? 

Regards
Dinesh B

New Post: Adding image using Open XML

$
0
0
Hey there!
Could really use some help with this problem.
I'm trying to make a program that uses ClosedXML and OpenXML.
ClosedXML is used for creating and updating the data in a excel file, and the OpenXML is only used for adding an image to an Excel file.

It's working okay in some ways but the trouble comes when I try to add in an image to an existing excel file.
Since the file is created in ClosedXML, how do I open it using OpenXML and add the image?
Here is the code I use for creating the XML and the code I use for updating the image in OpenXML.

http://pastebin.com/Z1LyvdxN

I don't really know how to make it work and would really appreciate any feedback with it. Thanks!

New Post: Row Height is not proper

$
0
0
What do you mean the height is not aligned properly? What's the problem?

New Post: same folder hyperlink not work.

New Post: Format Problem (challenge) (General/Text)

$
0
0
Hi Community!

We are using ClosedXML (which is a great library - thx) for a configurable export.

If you open Excel and type in 01.01.2013 the cell is formated as "General".

What we have here is ...
worksheet.Cell("A1").SetValue("01.01.2013");
// RESULT 01.01.2013 (Cell Format = "General")
worksheet.Cell("A2".Value = "01.01.2013";
// RESULT 1012013
Our problem (challenge) is to write the value into Excel without setting the format (like it is done when writing by hand)
Value is formating into "what's possible". Also a filter "01.01.2013..31.01.2013" is formated into an numeric value.

Any suggestions?

Commented Unassigned: Could not load type 'DocumentFormat.OpenXml.Spreadsheet.SmartTags' [8972]

$
0
0
Error occurs while using saveAs method:
Could not load type 'DocumentFormat.OpenXml.Spreadsheet.SmartTags' from assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Comments: ** Comment from web user: m473i **

any news on this? I am getting the same error...

Reviewed: ClosedXML 0.69.1 (Sep 18, 2013)

$
0
0
Rated 4 Stars (out of 5) - working perfectly! thanks a lot man

Commented Unassigned: Could not load type 'DocumentFormat.OpenXml.Spreadsheet.SmartTags' [8972]

$
0
0
Error occurs while using saveAs method:
Could not load type 'DocumentFormat.OpenXml.Spreadsheet.SmartTags' from assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Comments: ** Comment from web user: MDeLeon **

You must use the DocumentFormat.OpenXml.dll v2.0 (not v2.5)

Viewing all 1877 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>