Hi,
Hi,
e.g
Sample code:
var testBook = new Workbook();
var testSheet = testBook.Worksheets[testBook.Worksheets.Add()];
var testDate = new DateTime(2013, 1, 1);
testSheet.Cells[0, 0].PutValue(testDate);
testSheet.Cells[1, 0].Formula = “=WEEKNUM(A1)”;
testSheet.Cells[1, 0].Calculate(false, null);
Console.WriteLine(“Weeknum for date [” + testDate+ "]: " + testSheet.Cells[1, 0].IntValue); //2
Hi Amjad,
Hi,
Great. Just what I hoped for.
Hi,
Thanks for your posting and using Aspose.Cells.
We have fixed this issue.
Please download and try the latest fix: Aspose.Cells for .NET 7.7.2.3 and let us know your feedback.
Thanks for the update.
We are stille experiencing inconsistency.
To simplify the error report, I used WEEKNNUM() with one parameter only. But we need to use WEEKNUM() with system:21, so the correct example should be:
var testBook = new Workbook();
var testSheet = testBook.Worksheets[testBook.Worksheets.Add()];
var testDate = new DateTime(2012, 12, 31);
testSheet.Cells[0, 0].PutValue(testDate);
testSheet.Cells[1, 0].Formula = "=WEEKNUM(A1,21)";
testSheet.Cells[1, 0].Calculate(false, null);
Console.WriteLine("Weeknum for date [" + testDate + "]: " + testSheet.Cells[1, 0].IntValue);
Output should be '1' but is '54'. So, the function is fixed for WEEKNUM() with no system parameter, but still fails for system:21 WEEKNUM([DATE],21)
I have attached example sheet.
Thanking in advance
Soeren praestegaard, EnergiMidt A/S
Hi,
"#NUM!" |
Hi,
We use Danish MSOffice, and formula notation is a bit different.
Try making a new Excel sheet in your MS Excel, and have a formula calculate the weeknum as =WEEKNUM(A1,21), where A1 contains the date "2012-12-31". Excel then returns '1'.
I have attached example screenshots.
(Danish Excel uses formula name UGE.NR(), and uses ';' instead of ',' as parameter separator)
I continue to get different results for same formula and input, so there is still a bug in the framework.
Thanking in advance
Soeren Praestegaard, EnergiMidt A/S
Hi again,
Please consider this material: http://www.rondebruin.nl/win/s8/win001.htm
Especially the passage about "ISO Week Numbers".
It's actually ISO week numbers we need.
Thanking in advance
Soeren Praestegaard, EnergiMidt A/S
Hi,
Hi,
Thanks for using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells
for .NET v7.7.2.5 and let us know your feedback.
Hi,
The WEEKNUM() function seems to work now. Thanks.
But the new Aspose.Cells release gives me problems in some row deleting logic. Is the binaries, attached above, a dedicated branch for this issue, or are there changes in other parts of the framework in that build?
Thanking in advance
Soeren Praestegaard, EnergiMidt
Hi Soeren,
Thank you for the confirmation on the fix for WEEKNUM formula.
Aspose.Cells for .NET 7.7.2.5 (as shared in our previous post) is actually a maintenance release containing existing functionality as it is with a few bug fixes including the one in reference to WEEKNUM formula.
Please note, we take regression issues very seriously therefore if you have encountered a problem that you believe was working fine with previous versions then please share your code snippets as well as the sample spreadsheet (if any) so we could analyze it on our end to provide further assistance in this regard.
Hi,
I have attached a test sheet (DeletionTest.xlsx), to use with the following example code:
var testBook = new Workbook(@"c:\exceldata\DeletionTest.xlsx");
var column = 1;
var row = 3;
var sheet = testBook.Worksheets[0];
var cell = sheet.Cells[row, column];
while (!String.IsNullOrEmpty(cell.StringValue))
{
Console.WriteLine("Deleting row: " + cell.StringValue);
var trick = sheet.Cells[row + 1, column].StringValue;
sheet.Cells.DeleteRow(row);
cell = sheet.Cells[row, column];
}
This snippet will display content from cell in column 1, for each row to be deleted.
But try running the same snippet, but without this line:
"var trick = sheet.Cells[row + 1, column].StringValue;"
It seems the wrong row is being deleted, if next cell isn't red.
This works fine with Aspose Cells v.7.7.2.3, but gives wrong output with v.7.7.2.5
I have put this dummy read of the next row cell in my code, så I get the expected result, but it's a hack.
Good luck with that one ;)
Thanking in advance
Soeren Praestegaard, EnergiMidt
Hi Soeren,
Thanks for your posting and using Aspose.Cells.
We were able to observe this issue. Deletion test fails in Aspose.Cells v7.7.2.5 and works correct in v7.7.2.3. I have attached the screenshot showing the difference between the output of these. It seems, deletion of the row is not updated unless it is gone through a dummy read.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-42476.
Screenshot:
Hi,
Thanks for using Aspose.Cells.
Please download and try the fix: Aspose.Cells
for .NET v7.7.2.6 and let us know your feedback.
Hi,
Looks good. It works now.
Thanking in advance
Soeren Praestegaard, EnergiMidt A/S
Hi,
The issues you have found earlier (filed as CELLSNET-42476;CELLSNET-42424) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.