npoi

creating chart in an excel spreadsheet using NPOI

Hello, I know that my question will be very similar to other ones already asked on SO but as I can't find a satisfying answer, I try my luck ! Does so know whether it's possible or not to generate charts in an Excel spreadsheet using the NPOI library. I have read that blog but it gives an example where there is already an existing te...

NPOI License (opensource fear)

I was noticed that using Open source is dangerous, because some Open Source could be allowed only for Open Source projects. So my project is "For sell" and I'm scared using it... Can someone tell me : Can I use NPOI in my commerce project ? And maybe someone can clear my fears of using open source libraries and open source at all... T...

npoi export from datatable

I have an asp.net website that will generate some excel files with 7-8 sheets of data. The best solution so far seems to be NPOI, this can create excel files without installing excel on the server, and has a nice API simillar to the excel interop. However i can't find a way to dump an entire datatable in excel similar to CopyFromRecords...

How can columns be set to 'autosize' in Excel documents created with NPOI?

NPOI is a .NET port of the Java POI project, which allows one to read and write Microsoft Excel documents (as well as other Office formats). NPOI 1.2.2 has introduced support for 'autosizing' columns, whereby the column is set to the width of the widest cell entry in the column. However, there are many reports that this does not work. So...

Name cannot be same as builtin name

I generate a excel file using NPOI ,It works fine.However when i take that excel file to some other computer and open it gives the input box with warning message "Name cannot be same as built in name" is shown. When client enters any values in the input boxes the sheet finally opends but is a lot of trouble to the client .I searched the ...

NPOI Excel number format not showing in Excel sheet in asp.net

I am trying to create double and number format cells in excel using NPOI library. I used code like Dim cell As HSSFCell = row.CreateCell(j) cell.SetCellValue(Double.Parse(dr(col).ToString)) In excel numbers are aligning right but when I check format it is showing in "General" then I changed my code to like below Dim cell As HSSFC...

manipulate data before importing from excel to dataset

I have a couple of columns of data in an excel sheet which I have to import to my application. I do this using - string strConn; OleDbDataAdapter oledaExcelInfo; strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + Server.MapPath(strSavePath + strRepFileName) + ";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\""; oledaExcelI...

How to insert macro into a excel file without using the excel com library

Is there any way to insert an existing macro into a existing excel file without using the excel library ? I need this to set the excel to print whole work book .I cannot use excel library because it will be done online in the server where installation of excel is not possible. I can however use the c#.net coding . I am using NPOI to gene...

NPOI DataFormat

I'm exporting a grid with NPOI v1.2.3, and am having trouble getting cell formatting to work. I have a class that exports a list of objects to an XLS file. A row is created for each object, and a cell is added for each configured property. The cell data format can be set on a per-property level. I've read that you shouldn't create a ...

NPOI set cell style

C# or VB.NET suggestion are welcome. I have the following code to create Excel file with NPOI. It's working fine. I need to apply the cell style to those rows in the loops. Dim hssfworkbook As New HSSFWorkbook() Dim sheetOne As HSSFSheet = hssfworkbook.CreateSheet("Sheet1") hssfworkbook.CreateSheet("Sheet2") hssfworkbo...

NPOI HSSF vs SS namespace

I'm trying to use the NPOI library in a winforms app. I have referenced the latest NPOI dll in my project and tried to reproduce the examples gave by NPOI and found on SO: HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.CreateSheet("Sheet1"); HSSFRow headerRow = sheet.CreateRow(0); But th...

Excel Custom Data Format

I'm using NPOI to generate XLS spreadsheets. NPOI is an Excel Spreadsheet generation library/API that is available on codeplex, enables you to create workbooks, formatting, formulae and so on and so forth....I use it to create workbooks with multiple sheets that contain the output of the various calculations. I've used the following cus...