Quantcast
Channel: npoi Discussions Rss Feed
Viewing all 637 articles
Browse latest View live

New Post: HSSFWorkbook.GetCustomPalette and file's modify date strange behavior

$
0
0
Hello,

I have a strange behavior with XLS file produced by NPOI 2.0 (haven't test older version) using the following simple code :
HSSFWorkbook hssfworkbook = new HSSFWorkbook();
//string filePath = @"Z:\Shared\myfile.xls";
string filePath = @"C:\temp\myfile.xls";

var sheet = hssfworkbook.CreateSheet("Test");
HSSFPalette palette = hssfworkbook.GetCustomPalette();

// Write the stream data of workbook to the root directory
using (FileStream file = new FileStream(filePath, FileMode.Create))
{
    hssfworkbook.Write(file);
}
Opening the file on local folder using Excel 2007 doesn't update its modify date, and closing without modification doesn't update it neither.

Opening the file on network folder using Excel 2007 updates the modify date and will do so on each open until you save the file by Excel manual save. On closing the modify date isn't updated.

In this network case, Excel is not even asking me if I wish to save the file ...

If I remove the GetCustomPalette line the strange network behavior is no more.

Does anyone had the same issue ? What's the underlying problem ?

Thanks
Pierre

New Post: Formula Evaluation

$
0
0
What kind of formulas can be evaluated?.

New Post: Formula Evaluation

$
0
0
As long as the funtion used in the formula is implemented in NPOI.

New Post: Problem with recalculing.

$
0
0
Hello,

I have one xls file. This file is like template. File have 4 sheets. Last 3 sheets contains data from application. The 1 sheet is template sheet, where are links to data.

But my problem occurs at the moment when you load a template to fill in data and save it. Because the data links do not work, even though it is valid written.

To link to work, I have to click in the appropriate box and press enter.

Existuej in NPOI any possibility of a re-read the document?

New Post: Out of Memory Error - while writing to Excel using Xssfworkbook

$
0
0
No. Btw, how much memory did you consume on your computer when running the above code?
        for (int rownum = 0; rownum < 5000; rownum++)
        {
            IRow row = worksheet.CreateRow(rownum);
            for (int celnum = 0; celnum < 1000; celnum++)
            {
                ICell Cell = row.CreateCell(celnum);
                Cell.SetCellValue("Cell: Row-" + rownum + ";CellNo:" + celnum);
            }
        }
I'm afraid even this part takes a lot of memory. It's 5000*1000=5,000,000 cells.

New Post: .Net 3.5 to 4.5 Conversion.

$
0
0
Hi Everyone.

I have upgraded the .net framework of an existing website from 3.5 to 4.5

I am now getting an "PageRequestManagerParserErrorException" on all the previous working exports.

I have tried updating the NPOI.dll to the latest release using the 4.0 dll but a few of the classes are not usable (for instance, I can use see the Sheet Interface but not class).

My questions are as follows:
What could be causing the PageRequestManagerParserErrorException?
Why can't I instantiate the Sheet class but i can use ISheet in the new dll?

Thanks.

New Post: .Net 3.5 to 4.5 Conversion.

$
0
0
I Figured it out...

The problem wasn't related to the dlls or anything server side. For some reason, calling the __doPostBack on the onclick event embedded on an html control broke it.
<li runat="server" id="liExport" onclick="__doPostBack('ExportMyStuff', 0);" ClientIDMode="Static">Export Results</li>
I ended up wrapping the onClick call in jquery and everything works fine now.
$(document).on('click','#liExport',function () {
                __doPostBack('ExportMyStuff', 0);
            });

New Post: XSSF Performance: degrade when creating huge number of rows

$
0
0
May I know when next version release?

New Post: Creating secured Office files

$
0
0
Do you know if it is possible to create Office files write-protected using these libraries?

I'll be grateful for all suggestions.

New Post: Stress test of XSSF proves exponential time (performance concerns)

$
0
0
Hi zosea,

I suggest you try the latest source code in github. The performance has been improved a lot.

New Post: read word doc into string

$
0
0
It supports it but not in official release. ScratchPad namespace is for test purpose. Any source code in it is not stable.

New Post: XSSF issues (ShiftRows, lastRowNumber)

$
0
0
There are some bugs in ShiftRows in NPOI 2.0 beta 1.

New Post: Convert/Save HSSFWorkbook as XSSFWorkbook

$
0
0
This is not easy because you need to copy every objects from HSSFWorkbook to XSSFWorkbook. For now, it's not supported by NPOI.

New Post: Get Physical Column Number

$
0
0
Hi

I'd like to know, if there is a way to get Physical Number Of Columns from Excel


Thanks

New Post: Excel Data Writer Wrapper in Excel using NPOI

$
0
0
Made a .dll Wrapper where you can quickly make a template in excel, run your SQL or input your data set, and get an output of your data in an excel format. The only work you would do is in Excel. Also I could build a UI for this, but not sure if its wanted. Right now you'll have to add this to a .NET project as a reference.

Two functions are:
FillXLS_SQL(inputfile (XLS or XLSX), outputfile (same), SQL String, ConnString)
&
FillXLS_DataSet(inputfile, outputfile, DataSet)

Right now the format for any excel field is >>TableNumber^FieldName. Will work on any sheet you have in the workbook.

So, if you have one dataset that pulls name and address you would put in your template file in cell A1: >>1^Name; A2: >>1^Address

Hope that makes sense. Feel free to try it out and let me know what you think. I wont keep it up too long because its still a work in progress. Hope it saves a few of you some time.

Zipped up DLL File

New Post: Stress test of XSSF proves exponential time (performance concerns)

$
0
0
I still have bad timings using the new OOXML. I did however replace all the SortedDictionary<> in the GetLastKey calls with Dictionary<> and my times improved to this. This probably increases memory load however.

Start time: 11/21/2013 4:34:32 PM
[00:00:00.0850085] 0 rows written
[00:00:00.7930793] 10000 rows written
[00:00:02.5712571] 20000 rows written
[00:00:05.4945494] 30000 rows written
[00:00:09.4819481] 40000 rows written
[00:00:14.7574756] 50000 rows written
[00:00:21.1301128] 60000 rows written
[00:00:28.4608458] 70000 rows written
[00:00:37.0177014] 80000 rows written
[00:00:47.3060936] 90000 rows written
[00:00:58.1362526] 100000 rows written

Granted its slower than HSSF, but not exponentially slower as before.

New Post: Get Physical Column Number

$
0
0
In NPOI, the hierarchy is row based. You have to go though the IRows to see the lastcellnum of each row.

New Post: XSSF Performance: degrade when creating huge number of rows

$
0
0
The next version is NPOI 2.0 beta 2. It's planned to be released next month (Dec, 2013)

New Post: Stress test of XSSF proves exponential time (performance concerns)

$
0
0
Hi All,

I'm glad to say that the performance is greatly improved after changing the way of implementing GetLastKey()

Start time: 2013/11/24 21:47:55
[00:00:00.0439453] 0 rows written
[00:00:00.1054687] 10000 rows written
[00:00:00.1826171] 20000 rows written
[00:00:00.2646484] 30000 rows written
[00:00:00.3271484] 40000 rows written
[00:00:00.4130859] 50000 rows written
[00:00:00.4892578] 60000 rows written
[00:00:00.5498046] 70000 rows written
[00:00:00.6513671] 80000 rows written
[00:00:00.7246093] 90000 rows written
[00:00:00.8037109] 100000 rows written

Here is the result with your program. Don't be surprised :)

This fix will be included in NPOI 2.0 beta 2.

New Post: XSSF Performance: degrade when creating huge number of rows

$
0
0
Btw, I ran your program based on the latest code in github just now. Here is the latest result.

Start at 2013/11/24 21:51:59
End at 2013/11/24 21:52:01

I switched to Stopwatch to get more precious result. On my computer, it's 1830ms. Much shorter than 1 minute :)
Viewing all 637 articles
Browse latest View live


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