New Post: Removing Hyperlink
Dear NG,I'm trying to remove a hyperlink from a cell, but assigning null to a cell.hyperlink will raise an "System.NullReferenceException"I also tried to assign a new hyperlink with adress value as an...
View ArticleNew Post: open, edit and save
I need to open an excel 97-2003 file that is heavliy formatted. Save data to specific cells, then save it under a new name. Easy as pie with Interop but too costly.Have tried 8 other open source gigs...
View ArticleNew Post: open, edit and save
Never mind, found it (violated the "serach first" mantra) recalculate = true
View ArticleNew Post: Problem working with Excel 2007
Hi all, I am also facing the similar problem with xls format.While exporting excel file am adding a HSSFDataValidation. Its a dropdownlist for one column in sheet1 and the values are generated in...
View ArticleNew Post: Using NPOI.SS.UserModel to open both XLS and XLSX for reading
I've referenced NPOI.OOXML but the dll does not have a strong name so I cannot deploy it to the GAC (for a few different reasons, I do need to deploy it to the GAC). The other npoi dlls, npoi.dll,...
View ArticleNew Post: Check for row existence
Hi, i need to check existence of the row. For example, this code in NPOI.Examples (SetBordersOfRegion)//create horizontal 1-9 for (int i = 1; i <= 9; i++) {...
View ArticleNew Post: Problem with evaluating formula Now() or Today() on c#
Hi, I am using NPOI.SS.UserModel.FormulaEvaluator to evaluate a formula that contains the Now() function and I receive an error saying it was not possible to evaluate the corresponding cell, can...
View ArticleNew Post: Cell is locked when I write to an existing sheet
Hi, I hope quickly for an answer. I have the following code: HSSFSheet ws = (HSSFSheet)wb.GetSheet(Maanden[maand-1]); var nextRow = StartRij-1; HSSFRow row = (HSSFRow)ws.CreateRow(nextRow); row =...
View ArticleNew Post: Can't open and change data in xls file using NPOI. C#
@timclaason, I really want to thank you for this information. Kept getting cannot write to closed file. This worked like magic and I truly appreciate this - enough that I registered to say thanks LOL!...
View ArticleNew Post: How to block the execution of makro's or VBA formulas in Excel 2007...
Hi all, is any way to block an excel makro's execution or VBA formulas that check (or calculate) cells. I have to work with not my own excel file that is protected by password. I can open file, add...
View ArticleNew Post: Add pictures to exists Excel file with pictures
After I add some pictures to an Excel file with old pictures, I can see the new added pictures, but I cannot see the old pictures. Is there any solution to fix it? private void WriteItem(HSSFRow...
View ArticleNew Post: How to configure whole column without configure the cell
Hi all, I got situation that while using Npoi, i have to configure the particular column instead of all cells for that column. Even in my Npoi dll there is no Examples Class. So please guide to do so...
View ArticleNew Post: [XSS] XLSX file : repair needed when using Double in SetCellValue()
When exctracting data form a SQL Table, I store data in Object variables in order to be sure not to loose data type. Then I made a method to check Object data type and transtype automatically the...
View ArticleNew Post: .xlsx. Date cell import to DataTable
Hi! I'm tried to convert .xlsx file to DataTable format by using NPOI 2.0 library. It's OK, but I have a problem with convert to string date cell. When I try to use construction like...
View ArticleNew Post: .xlsx. Date cell import to DataTable
ICell.ToString should not be rebused. You should determine the type of Cell first by ICell.CellType. Then use different property to get the values like NumericCellValue, DateCellValue and so on.
View ArticleNew Post: How to configure whole column without configure the cell
There is no existing API to configure a whole column because the structure of a sheet consists of IRow, ICell, instead of IColumn, ICell. You have to iterate the IRow and call GetCell with the fixed...
View ArticleNew Post: Add pictures to exists Excel file with pictures
Which version of NPOI are you using? 1.2.5 or 2.0?
View ArticleNew Post: .xlsx. Date cell import to DataTable
No. Problem was with a CurrentCulture. I'm from Russia, and with my culture this code don't work. Solution of my problem:private DataTable xlsxToDT(string fileName) { var prevCulture =...
View ArticleNew Post: Applying cell style to a merged region
Hello, I pretty sure you solved this one or no longer need it but I'm adding a solution anyway for anyone in the future. I'd the same issue and I solved it by applying the same style to all cells...
View Article