Closed tonyqus closed 3 years ago
Please,When will the next official version be released
@fu827707013 very soon. I'm trying to build since tonight. The release candidate will be ready in 2 days.
please let's know when it is ready in nuget.org
NPOI 2.5.2 released on nuget! Please help test this nuget package. Thank you!
Hi Tony,
I tested the new version 2.5.2 and unfortunately, I got errors in running the following command in C#
Cell.SetCellFormula(string.Format("SUM(C{0}:C{1})", HeaderRowOffset + 1, totalRow.RowNum - 2 + 1));
Cell.SetCellFormula("NOW()");
System.ArgumentNullException HResult=0x80004003 Message=Value cannot be null. (Parameter 'stream') Source=System.Private.CoreLib StackTrace: at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen) at System.IO.StreamReader..ctor(Stream stream) at NPOI.SS.Formula.Function.FunctionMetadataReader.CreateRegistry() at NPOI.SS.Formula.Function.FunctionMetadataRegistry.GetInstance() at NPOI.SS.Formula.Function.FunctionMetadataRegistry.LookupIndexByName(String name) at NPOI.SS.Formula.PTG.AbstractFunctionPtg.IsBuiltInFunctionName(String name) at NPOI.SS.Formula.FormulaParser.Function(String name) at NPOI.SS.Formula.FormulaParser.ParseNonRange(Int32 savePointer) at NPOI.SS.Formula.FormulaParser.ParseRangeable() at NPOI.SS.Formula.FormulaParser.ParseRangeExpression() at NPOI.SS.Formula.FormulaParser.ParseSimpleFactor() at NPOI.SS.Formula.FormulaParser.PercentFactor() at NPOI.SS.Formula.FormulaParser.PowerFactor() at NPOI.SS.Formula.FormulaParser.Term() at NPOI.SS.Formula.FormulaParser.AdditiveExpression() at NPOI.SS.Formula.FormulaParser.ConcatExpression() at NPOI.SS.Formula.FormulaParser.ComparisonExpression() at NPOI.SS.Formula.FormulaParser.IntersectionExpression() at NPOI.SS.Formula.FormulaParser.UnionExpression() at NPOI.SS.Formula.FormulaParser.Parse() at NPOI.SS.Formula.FormulaParser.Parse(String formula, IFormulaParsingWorkbook workbook, FormulaType formulaType, Int32 sheetIndex, Int32 rowIndex) at NPOI.XSSF.UserModel.XSSFCell.SetFormula(String formula, FormulaType formulaType) at NPOI.XSSF.UserModel.XSSFCell.SetCellFormula(String formula)
Thanks, Daniel Guo
From: Tony Qu notifications@github.com Sent: Saturday, December 5, 2020 1:25 PM To: nissl-lab/npoi npoi@noreply.github.com Cc: yafeiguo888 yfguo@hotmail.com; Comment comment@noreply.github.com Subject: Re: [nissl-lab/npoi] NPOI 2.5.2 Release Notes (#465)
NPOI 2.5.2 released on nuget! Please help test this nuget package. Thank you!
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnissl-lab%2Fnpoi%2Fissues%2F465%23issuecomment-739418146&data=04%7C01%7C%7C5c964a1580a949b3fc1208d899644dd6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637428003360252839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vrec6PeiFHAdEnh7rWB7qw7E%2Fm38lxII07FuzNnEVT0%3D&reserved=0, or unsubscribehttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH7RXGUMDTAM5KN6JP2VGU3STKQM5ANCNFSM4UC7TLBQ&data=04%7C01%7C%7C5c964a1580a949b3fc1208d899644dd6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637428003360262835%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CZPGtQMt6RV49G1X%2B3MbJc3KxT6IeycIWqmCuf8oCUo%3D&reserved=0.
@yafeiguo888 I did test SetFormula. It works fine on my box. Please create new issue for your case. This issue will be closed.
Hi Tonyqus, I still the same problem that @wangafei told to you. I can add an image in the header OR in the body (content) of the document, however when I try to put the same image in the header AND in the body of the document, it displays the error.
Look a litle bit of the code: `
uint numImage = 0;
foreach (var p in list_XWPFParagraph)
{
var runs = p.Runs;
foreach (var run in runs)
{
using (FileStream picData = new FileStream(@"C:\Images\myImage.jpg", FileMode.Open, FileAccess.Read))
{
numImage++;
run.AddPicture(picData, (int)PictureType.JPEG, $"{tag.Tag + numImage}", largura, altura);
var docPr = ((NPOI.OpenXmlFormats.Dml.WordProcessing.CT_Drawing)run.GetCTR().Items[run.GetCTR().Items.Count - 1]).inline[0].docPr;
docPr.id = numImage;
}
}
}
`
We are going to release 2.5.2 soon. Here is the release notes
448 Add ifs, maxifs, minifs functions to analysis tool pack
410 fix Match function for compatible
423 AddPicture doesn't work, corrupts DOCX file
397 LocalUtil.GetUserTimeZone NullReferenceException
167 Unable to add image to a word document header or footer using XWPF
346 NullReferenceException when copying sheet in some Excel files
413 fix: Rich strings hash for texts with the color set as RGB
444 Update RANDBETWEEN
158 NPOI Excel Merging Causing “Repaired Records”
345 Excel unreadable content error after editing existing file
358 Remove static locale state
367 fix incorrect footnote handling
372 NPOI requires GDI+ dependency even on sheet creation without using column auto-sizing
281 InvalidOperationException on XSSFSheet.GetColumnStyle
377 AutoSizeColumnTracker to Lazy, fix build errors
339 improve performance of CreateRow for bigger excel sheets