Quantcast
Channel: NPOI
Viewing all 1621 articles
Browse latest View live

New Post: Is there any volunteer to join me?

$
0
0
Hi tonyqus,

I am a programmar in C# for 5 years and I'd like to do somethine for npoi.

If there is any thing I can do to assist in feature enhancement, let me know.


email: dongyongjing@163.com

New Post: How can I obtain Scaling mode: Reduce/Enlarge printout?

$
0
0
HI all,
I've a problem with NPOI. I need to change the print options of my worksheet so that Openoffice can print it reading Scaling mode: Reduce/Enlarge printout (last option in the following screenshot):

Image

No matter what I try, I always obtain this:

Image

New Post: Saving large workbooks

$
0
0
I have the same problem :(

MemoryStream WriteToStream()
{
    //Write the stream data of workbook to the root directory
    MemoryStream file = new MemoryStream();
    hssfworkbook.Write(file);
    return file;
}
generate the error in the line:
 hssfworkbook.Write(file);
constructs the workbook but in the moment of make the write... failure!!

no way I finished building the excel?

New Post: excel data corruption

$
0
0
Read xlsx template , modify xlsx data, then save to excel file, and then open saved xlsx file ; Excel program will prompt repair data, opened excel file format and content have changed
 OpenFileDialog dialog = new OpenFileDialog();
            dialog.Filter = "excel file *.xlsm|*.xlsm";

            if (dialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            FileStream fileStream = new FileStream(dialog.FileName, FileMode.Open, FileAccess.Read);
            IWorkbook workbook = WorkbookFactory.Create(fileStream);

            ISheet ProcessSheet = workbook.GetSheet("sheet1");

            ProcessSheet.ShiftRows(9, ProcessSheet.LastRowNum, 10, true, false);

            SaveFileDialog saveDialog = new SaveFileDialog();
            saveDialog.Filter = "Excel file *.xlsm|*.xlsm";
            if (saveDialog.ShowDialog() == DialogResult.Cancel)
                return;

            FileStream WirteStream = new FileStream(saveDialog.FileName, FileMode.OpenOrCreate, FileAccess.Write);
            workbook.Write(WirteStream);
            WirteStream.Close();
            fileStream.Close();

New Post: 修改xlsx文件后保存会丢失数据和格式

$
0
0
1读物xlsx文件或xlsm文件
2修改xlsx中的数据然后保存其他文件
3打开保存文件,Excel程序会提示:在文件中发现不可读取的内容。是否恢复此工作薄?如果信任此工作薄的来源,请选择是
4强制信任后打开,发现文件和原文件格式丢失
5上述问题再excel2003中不存在,只在excel2007存在
OpenFileDialog dialog = new OpenFileDialog();
            dialog.Filter = "excel file *.xlsx|*.xlsx";

            if (dialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            FileStream fileStream = new FileStream(dialog.FileName, FileMode.Open, FileAccess.Read);
            IWorkbook workbook = WorkbookFactory.Create(fileStream);

            ISheet ProcessSheet = workbook.GetSheet("sheet1");

            ProcessSheet.ShiftRows(9, ProcessSheet.LastRowNum, 10, true, false);

            SaveFileDialog saveDialog = new SaveFileDialog();
            saveDialog.Filter = "Excel file *.xlsx|*.xlsx";
            if (saveDialog.ShowDialog() == DialogResult.Cancel)
                return;

            FileStream WirteStream = new FileStream(saveDialog.FileName, FileMode.OpenOrCreate, FileAccess.Write);
            workbook.Write(WirteStream);
            WirteStream.Close();
            fileStream.Close();

New Post: Worksheets right to left

$
0
0
Hello,

I'm using your wonderful library and I'm very pleased with it!
One little but big thing that does bother me is the lack support of RTL.
A1 is on the upper left corner while my customer wants it to be on the upper-right cornet- right to left.

I opened a discussion about that 2 years ago, was it implemented since then?
If not, can you please implement it soon? it doesn't sound like a hard thing to implement, am I right?

BTW, I wrote a small library that takes params T[] and creates a full workbook with worksheets for every T array, I implemented it using reflection and my custom ReportAttribute attribute, it is quite awesome and very easy to use.

Thanks for your wonderful library!

Reviewed: NPOI 2.0 alpha (五月 01, 2013)

$
0
0
Rated 5 Stars (out of 5) - yes,i like it.

New Post: CreateCellComment gives System.ArgumentException: An item with the same key has already been added.

$
0
0
This happens only in some cells now and my template worked fine before this few weeks.
  public static void SetComment(ref ISheet w, int row, int col, string text)
    {
        try
        {
            w.GetRow(row).GetCell(col).RemoveCellComment();
        }
        catch (Exception ex) {
        }

        if (text != "")
        {

            if (col < 200)
            {
                    IDrawing d = w.CreateDrawingPatriarch();
                    IComment comment = d.CreateCellComment(new HSSFClientAnchor(0, 0, 0, 0, col, row, col + 4, row + text.Split('\n').Length));
//Exception happens above
                    comment.Author = "CRM";
                    comment.String = (new HSSFRichTextString(text));
                    if (w.GetRow(row).GetCell(col) != null) w.GetRow(row).GetCell(col).CellComment = comment;
            }
        }
    }


Stack trace:

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary
2.Add(TKey key, TValue value)
at NPOI.HSSF.Record.EscherAggregate.AddTailRecord(NoteRecord note)
at NPOI.HSSF.UserModel.HSSFComment.AfterInsert(HSSFPatriarch patriarch)
at NPOI.HSSF.UserModel.HSSFPatriarch.OnCreate(HSSFShape shape)
at NPOI.HSSF.UserModel.HSSFPatriarch.CreateComment(HSSFAnchor anchor)
at NPOI.HSSF.UserModel.HSSFPatriarch.CreateCellComment(IClientAnchor anchor)
at CashflowUpdater.XSSFProgram.SetComment(ISheet& w, Int32 row, Int32 col, String text) in


What could be wrong?

New Post: I can't get it work using VB.NET

$
0
0
The following code is not working:

Try

Dim workbook = New HSSFWorkbook()
Dim sheet As HSSFSheet = workbook.CreateSheet("Sheet1")
Dim row As HSSFRow = sheet.CreateRow(0)
row.CreateCell(0).SetCellValue("Cell1")
            Using ms As New MemoryStream()
                workbook.Write(ms)

                Dim saveAsFileName As String = String.Format("Export-{0:d}.xls", DateTime.Now).Replace("/", "-")


                Response.ContentType = "application/vnd.ms-excel"
                Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", saveAsFileName))
                Response.Clear()
                Response.BinaryWrite(ms.GetBuffer())
                Response.End()

            End Using
Catch ex As Exception

End Try

I am getting "ex = {Unable to evaluate expression.}"

Please help

New Post: I can't get it work using VB.NET

New Post: Getting Different Result When Running Code in Visual Studio 2012 Debugger and on Deployed Web Site

$
0
0
Visual Studio Express 2012 for Web. Windows Server 2008 R2. IIS 7.0.

I have code that creates an Excel workbook from the results of a SQL query and then offers to open or download the Excel file. This code works fine and creates the expected files when run in the VS debugger. However, when run on the deployed site, the file downloaded is either empty or just contains the header. Ahyone know why the code would work in debug but not on the deployed site? The code is below.
 'Libraries needed for the NPOI Excel worksheet creation
Imports NPOI.HSSF.UserModel
Imports NPOI.HSSF.UserModel.HSSFCellStyle
Imports NPOI.HPSF
Imports NPOI.HSSF.Util
Imports NPOI.POIFS.FileSystem     

Private Sub DownloadMailMerge(Optional ByVal DType As String = "Group")
        Dim strSQL As String = "", Success As Boolean, MyDataSet As DataSet, I, NLines, NCol As Integer
        Dim SheetName As String, Row As HSSFRow, ShortFileName As String
        'Create workbook
        Dim xlWorkBook = New HSSFWorkbook()
        On Error GoTo DMM_Err
        SheetName = GroupDropDownList.SelectedItem.Text
        'Create Sheets
        Dim xlWorkSheet As HSSFSheet = xlWorkBook.CreateSheet(SheetName)
        xlWorkSheet.CreateRow(0).CreateCell(0).SetCellValue("test")
        With xlWorkSheet
            If DType = "Group" Then
                Row = xlWorkSheet.CreateRow(0)
                Row.CreateCell(0).SetCellValue("Name")
                Row.CreateCell(1).SetCellValue("Addressee")
                Row.CreateCell(2).SetCellValue("Salutation")
                Row.CreateCell(3).SetCellValue("AddressLine1")
                Row.CreateCell(4).SetCellValue("AddressLine2")
                Row.CreateCell(5).SetCellValue("City")
                Row.CreateCell(6).SetCellValue("State")
                Row.CreateCell(7).SetCellValue("Zip")
                Row.CreateCell(8).SetCellValue("Region")
                Row.CreateCell(9).SetCellValue("ChaplainSINGLE")
                Row.CreateCell(10).SetCellValue("ChaplainsPLURAL")
                Row.CreateCell(11).SetCellValue("StaffSINGLE")
                Row.CreateCell(12).SetCellValue("StaffPLURAL")
                Row.CreateCell(13).SetCellValue("Facility")
                Row.CreateCell(14).SetCellValue("LastGiftDate")
                Row.CreateCell(15).SetCellValue("LastGiftFundDescription")
                'Row.CreateCell(16).SetCellValue("LastGiftAppealDescription")
                NCol = 16
            ElseIf DType = "Top" Then
                Row = xlWorkSheet.CreateRow(0)
                Row.CreateCell(0).SetCellValue("Name")
                Row.CreateCell(1).SetCellValue("Addressee")
                Row.CreateCell(2).SetCellValue("Salutation")
                Row.CreateCell(3).SetCellValue("AddressLine1")
                Row.CreateCell(4).SetCellValue("AddressLine2")
                Row.CreateCell(5).SetCellValue("City")
                Row.CreateCell(6).SetCellValue("State")
                Row.CreateCell(7).SetCellValue("Zip")
                Row.CreateCell(8).SetCellValue("Region")
                Row.CreateCell(9).SetCellValue("ChaplainSINGLE")
                Row.CreateCell(10).SetCellValue("ChaplainsPLURAL")
                Row.CreateCell(11).SetCellValue("StaffSINGLE")
                Row.CreateCell(12).SetCellValue("StaffPLURAL")
                Row.CreateCell(13).SetCellValue("Facility")
                Row.CreateCell(14).SetCellValue("Director")
                NCol = 15
            Else
            End If
            'wrap the address block
            Dim WT As HSSFCellStyle = xlWorkBook.CreateCellStyle
            WT.WrapText = True
            xlWorkSheet.SetDefaultColumnStyle(0, WT)
        End With
        If DType = "Group" Then
            'Build the query
            Dim strDate, strAmount As String
            'Build the WHERE clause for the date.
            strDate = BuildDateString()
            'Build WHERE clause for amounts for group.
            strAmount = BuildAmountString()
            'Combine the date and amount criteria into main SQL statement.
            strSQL = GetMainSQL(strDate, strAmount)
            ShortFileName = Replace(GroupDropDownList.SelectedItem.Text, " ", "") + ".xls"
        ElseIf DType = "Top" Then
            'strSQL = "SELECT Name,Addressee,Salutation,AddressLine1,AddressLine2,City,State,Zip,Region,Chaplain,Director,LastGiftFund FROM [!Extranet_Appeal_Top_Donor_v]" ' ORDER BY RECORDS_SEARCHNAME.KEY_NAME, RECORDS_SEARCHNAME.FIRST_NAME, RECORDS_SEARCHNAME.MIDDLE_NAME
            strSQL = GetTopDonorSQL()
            ShortFileName = "Top Donor.xls"
        End If
        Session("ALMMSelect") = strSQL
        Dim Name, Addressee, Salutation, AddressLine1, AddressLine2, City, State, Zip, Region, Chaplain, Chaplains, Staff, Staffs, Director, Facility, LastGiftDate, LastGiftFund, LastGiftFundID, LastGiftAppeal As String
        Dim strTmp As String = ""
        Dim II, JJ As Integer
        MyDataSet = Utilities.GetDataSet3(strSQL, Success)
        If MyDataSet.Tables(0).Rows.Count > 0 Then
            NLines = 0
            For Each dr As DataRow In MyDataSet.Tables(0).Rows
                Chaplain = "" : Chaplains = "" : Staff = "" : Staffs = ""
                Name = IIf(IsDBNull(dr("Name")), "", dr("Name"))
                Addressee = IIf(IsDBNull(dr("Addressee")), "", dr("Addressee"))
                Salutation = IIf(IsDBNull(dr("Salutation")), "", dr("Salutation"))
                AddressLine1 = IIf(IsDBNull(dr("AddressLine1")), "", dr("AddressLine1"))
                AddressLine2 = IIf(IsDBNull(dr("AddressLine2")), "", dr("AddressLine2"))
                City = IIf(IsDBNull(dr("City")), "", dr("City"))
                State = IIf(IsDBNull(dr("State")), "", dr("State"))
                Zip = IIf(IsDBNull(dr("Zip")), "", dr("Zip"))
                Region = IIf(IsDBNull(dr("Region")), "", dr("Region"))
                LastGiftFund = IIf(IsDBNull(dr("LastGiftFund")), "", dr("LastGiftFund"))
                LastGiftFundID = IIf(IsDBNull(dr("LastGiftFundID")), "", dr("LastGiftFundID"))
                strTmp = ChaplainDict(LastGiftFundID)
                If InStr(strTmp, "Chaplains") > 0 Or InStr(strTmp, " chaplains ") > 0 Then
                    Chaplains = strTmp
                ElseIf InStr(strTmp, "Chaplain") > 0 Then
                    Chaplain = strTmp
                ElseIf InStr(strTmp, " and ") > 0 Then
                    Staffs = strTmp
                Else
                    Staff = strTmp
                End If
                Facility = FacilityDict(LastGiftFundID)
                If DType = "Group" Then
                    'LastGiftAppeal = IIf(IsDBNull(dr("LastGiftAppeal")), "", dr("LastGiftAppeal"))
                    LastGiftDate = IIf(IsDBNull(dr("LastGiftDate")), "", dr("LastGiftDate"))
                ElseIf DType = "Top" Then
                    Director = IIf(IsDBNull(dr("Director")), "", dr("Director"))
                End If
                'Do Not process benevolence fund gifts
                If InStr(LCase(LastGiftFundID), "0098Ben") = 0 And InStr(LCase(LastGiftFundID), "0098PHitch") = 0 Then
                    NLines = NLines + 1
                    With xlWorkSheet
                        Row = xlWorkSheet.CreateRow(NLines)
                        Row.CreateCell(0).SetCellValue(Name)
                        'Adjust row height for number of lines in address block
                        'Row.HeightInPoints = 14 * NAddressLines
                        Row.CreateCell(1).SetCellValue(Addressee)
                        Row.CreateCell(2).SetCellValue(Salutation)
                        Row.CreateCell(3).SetCellValue(AddressLine1)
                        Row.CreateCell(4).SetCellValue(AddressLine2)
                        Row.CreateCell(5).SetCellValue(City)
                        Row.CreateCell(6).SetCellValue(State)
                        Row.CreateCell(7).SetCellValue(Zip)
                        Row.CreateCell(8).SetCellValue(Region)
                        Row.CreateCell(9).SetCellValue(Chaplain)
                        Row.CreateCell(10).SetCellValue(Chaplains)
                        Row.CreateCell(11).SetCellValue(Staff)
                        Row.CreateCell(12).SetCellValue(Staffs)
                        Row.CreateCell(13).SetCellValue(Facility)
                        If DType = "Group" Then
                            Row.CreateCell(14).SetCellValue(LastGiftDate)
                            Row.CreateCell(15).SetCellValue(LastGiftFund)
                            Row.CreateCell(16).SetCellValue(LastGiftFundID)
                            'Row.CreateCell(17).SetCellValue(LastGiftAppeal)
                        ElseIf DType = "Top" Then
                            Row.CreateCell(14).SetCellValue(Director)
                        End If
                    End With
                Else
                    'Beep()
                End If
            Next
            'Format the columns to fit (autosize)
            For I = 0 To NCol - 1
                'xlWorkSheet.SetColumnWidth(I, 20 * 256)
                xlWorkSheet.AutoSizeColumn(I)
            Next
            'Create XLS file in memory
            Dim file As New MemoryStream()
            xlWorkBook.Write(file)
            'Stream file to browser
            Response.ContentType = "application/vnd.ms-excel"
            Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", ShortFileName))
            Response.Clear()
            Response.BinaryWrite(file.GetBuffer())
            Response.End()
        End If
DMM_Exit:
        Exit Sub
DMM_Err:
        Resume Next
    End Sub

New Post: Convert/Save HSSFWorkbook as XSSFWorkbook

$
0
0
public void SaveExcel()
    {
        try
        {
            FileStream fwriter = new FileStream("c:\\ss.xlsx",FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);

            MemoryStream file = new MemoryStream();
            workbook.Write(file);
            file.WriteTo(fwriter);

        }
        catch (Exception)
        {
            throw;
        }
    }
void InitializeWorkbook()
    {

        workbook = new HSSFWorkbook();

        ////create a entry of DocumentSummaryInformation
        DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation();
        dsi.Company = "NPOI Team";
        workbook.DocumentSummaryInformation = dsi;

        ////create a entry of SummaryInformation
        SummaryInformation si = PropertySetFactory.CreateSummaryInformation();
        si.Subject = "NPOI SDK Example";
        workbook.SummaryInformation = si;
        worksheet = workbook.CreateSheet("Sheet1");
    }

    public void AddData(int row, int col, string data)//, string format)
    {
        try
        {
            worksheet.CreateRow(row).CreateCell(col).SetCellValue(data);
        }
        catch (Exception)
        {
            throw;
        }
    }

New Post: Will SetActiveCell be implemented in 2.0? Stress test proves exponential time

$
0
0
I did a quick stress test of npoi 2.0 beta and I simply wrote a string in the first cell of each row up to 100k. The output was as follows:

Start time: 5/14/2013 5:05:39 PM
[00:00:00.0170017] 0 rows written
[00:00:02.7792779] 10000 rows written
[00:00:11.1951194] 20000 rows written
[00:00:27.7817779] 30000 rows written
[00:00:53.5283523] 40000 rows written
[00:01:30.1910182] 50000 rows written
[00:02:16.2836270] 60000 rows written
[00:03:14.6894670] 70000 rows written
[00:04:21.9641938] 80000 rows written
[00:05:38.7868753] 90000 rows written
[00:07:05.4055363] 100000 rows written

As you can see the curve here will be exponential and this is really terrible performance. After using the performance wizard in VS 2012, I found that 88% of the time was spent in GetLastKey. This means that the majority of the time was spent seeking in the sheet to the appropriate row (my theory is supported by the above data, each incremental set is longer to write). I am hoping to improve this by updating the active cell with each cell set, but I get a not implemented error when I call SetActiveCell. Is there a work around here?

My code:
class Program
{
    static void Main(string[] args)
    {
        IWorkbook workbook = new XSSFWorkbook();
        ICell cell;
        ISheet sheet = workbook.CreateSheet("StressTest");
        int i = 0;
        int rowLimit = 100000;
        DateTime originalTime = DateTime.Now;

        System.Console.WriteLine("Start time: " + originalTime);

        for (i = 0; i <= rowLimit; i++)
        {
            cell = sheet.CreateRow(i).CreateCell(0);
            //sheet.SetActiveCell(i, 0);
            cell.SetCellValue("ZOMG PLEASE SURVIVE THIS STRESS TEST");

            if(i % 10000 == 0)
            {
                System.Console.WriteLine("[" + (DateTime.Now - originalTime) + "]" + " " + i + " rows written");
            }
        }

        FileStream sw = File.Create("test.xlsx");
        workbook.Write(sw);
        sw.Close();

        //prompt user so we do not close the window with our data :)
        System.Console.Read();
    }
}

New Post: Will SetActiveCell be implemented in 2.0? Stress test proves exponential time

$
0
0
I tried using cell.SetAsActiveCell() and there was no improvement to performance... tiny bit worse actually.

Start time: 5/14/2013 6:36:50 PM
[00:00:00.0190019] 0 rows written
[00:00:02.8392839] 10000 rows written
[00:00:11.4071406] 20000 rows written
[00:00:28.3778375] 30000 rows written
[00:00:55.7105705] 40000 rows written
[00:01:33.2173208] 50000 rows written
[00:02:21.7171703] 60000 rows written

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

$
0
0
Also, if you simply change XSSFWorkbook to HSSFWorkbook (Still using NPOI 2.0 beta)... these are the results

Start time: 5/15/2013 11:09:36 AM
[00:00:00.0270027] 0 rows written
[00:00:00.0540054] 10000 rows written
[00:00:00.0920092] 20000 rows written
[00:00:00.1160116] 30000 rows written
[00:00:00.1980198] 40000 rows written
[00:00:00.2220222] 50000 rows written
[00:00:00.2820282] 60000 rows written
(crash due to row limit)

The speed difference is concerning.

Now we can compare to NPOI 1.2.3 which must use HSSFWorkbook... these are the results

Start time: 5/15/2013 11:27:18 AM
[00:00:00.0180018] 0 rows written
[00:00:00.0380038] 10000 rows written
[00:00:00.0550055] 20000 rows written
[00:00:00.0880088] 30000 rows written
[00:00:00.1070107] 40000 rows written
[00:00:00.1900190] 50000 rows written
[00:00:00.2450245] 60000 rows written

This is even faster, though the fact that we are talking about tenths of a second is still good.

Created Issue: Invalid row number (65536) outside allowable range (0..65535) [11783]

$
0
0
Hi, I need to create a Excel file greater than 65536 rows, the library is already prepared for this? Hope you can help me.

Thanks in advance.

Commented Issue: Invalid row number (65536) outside allowable range (0..65535) [11783]

$
0
0
Hi, I need to create a Excel file greater than 65536 rows, the library is already prepared for this? Hope you can help me.

Thanks in advance.
Comments: ** Comment from web user: prege **

Have your tried xlsx export using NPOI 2.0?

Commented Issue: Invalid row number (65536) outside allowable range (0..65535) [11783]

$
0
0
Hi, I need to create a Excel file greater than 65536 rows, the library is already prepared for this? Hope you can help me.

Thanks in advance.
Comments: ** Comment from web user: DotNetDeveloperCR **

Thanks for the reply, no I have not tried export xlsx, what I'm trying to do is generate the Excel from a list, if the list is shorter than 65536, the file generates perfectly, but if is bigger than 65536, I get "Invalid row number (65536) outside allowable range (0..65535)", so what I need to know if NPOI is capable to generate the file.

Thanks again.

Closed Issue: Access issue creating worksheet [11383]

$
0
0
The following error occurs when we try to create a worksheet. The issue is resolved by setting IIS 7.0 LoadUserProfile to true. We are trying to understand why this is needed and teh secruity implications and if there is a workaround to make this work without having to change the default IIS settingSystem.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Environment.get_UserName() at NPOI.HSSF.Model.InternalWorkbook.CreateWriteAccess() at NPOI.HSSF.Model.InternalWorkbook.CreateWorkbook() at NPOI.HSSF.UserModel.HSSFWorkbook..ctor() at ....The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.EnvironmentPermission The first permission that failed was: version="1" Read="UserName"/> The demand was for: version="1" Read="UserName"/> The granted set of the failing assembly was: version="1"> version="1" Access="Open"/> version="1" Allowed="ApplicationIsolationByUser" UserQuota="512000"/> version="1" Flags="Execution"/> version="1" Window="SafeTopLevelWindows" Clipboard="OwnClipboard"/> version="1" PublicKeyBlob="002400000480000094000000060200000024000052534131000400000100010095CCD95AF3B39D8BC20544D3F47FD24B53EBC5CCB693EAED116290629F8CD882C827EBD511AD59449224F0718D3F9D03B64945A6C8B6644266001B8C8426185330E3D96DA70AE16D4ACC21B8D4D480F1385C7E924273179375AA88F81380A72FB115712A313379D16AED4AA36208EE3B4A5DD785B06A07B2D868E3227F4495B5" Name="NPOI" AssemblyVersion="1.2.5.0"/> version="1" Url="file:///c:/xxx/web/bin/NPOI.DLL"/> version="1" Zone="Internet"/> version="1" Level="SafePrinting"/> The assembly or AppDomain that failed was: NPOI, Version=1.2.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1 The method that caused the failure was: NPOI.HSSF.Record.Record CreateWriteAccess() The Zone of the assembly that failed was: Internet The Url of the assembly that failed was: file:///c:/xxx/web/bin/NPOI.DLL --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at ...

Closed Issue: [HSSF]Comment is not saved correctly while using a xls template with comment [11169]

$
0
0
If you read an existing xls template with comment in it and then save it as a new xls, the comment will be lost and Excel will say 'file data lost' in some cases. This is confirmed as a bug in all previous version of NPOI. It's plan to be fixed in NPOI 2.0.
Viewing all 1621 articles
Browse latest View live


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