Skip to content

Commit 0891696

Browse files
committed
Support for Closed.Xml 0.95.0
1 parent 910c064 commit 0891696

22 files changed

+64
-95
lines changed

ExcelReportGenerator.Samples/ExcelReportGenerator.Samples.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<DefineConstants>DEBUG;TRACE</DefineConstants>
4040
<ErrorReport>prompt</ErrorReport>
4141
<WarningLevel>4</WarningLevel>
42-
<LangVersion>5</LangVersion>
42+
<LangVersion>8</LangVersion>
4343
</PropertyGroup>
4444
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
4545
<PlatformTarget>AnyCPU</PlatformTarget>

ExcelReportGenerator.Tests/Excel/ExcelHelperTest.cs

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,10 @@ public void TestCopyRange()
195195

196196
ws.Cell(11, 9).Value = DateTime.Now;
197197
ws.Cell(11, 9).DataType = XLDataType.DateTime;
198-
//ws.Cell(11, 9).DataType = XLCellValues.DateTime;
199198

200199
IXLRange newRange = ExcelHelper.CopyRange(range, ws.Cell(10, 8));
201200

202-
Assert.AreEqual(4, ws.CellsUsed().Count());
201+
Assert.AreEqual(4, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
203202
Assert.AreEqual(range.FirstCell(), ws.Cell(6, 5));
204203
Assert.AreEqual(range.LastCell(), ws.Cell(9, 7));
205204
Assert.AreEqual("RangeStart", range.FirstCell().Value.ToString());
@@ -213,12 +212,11 @@ public void TestCopyRange()
213212
Assert.AreEqual(XLBorderStyleValues.Thin, newRange.FirstCell().Style.Border.TopBorder);
214213
Assert.AreEqual(XLBorderStyleValues.Thin, newRange.LastCell().Style.Border.BottomBorder);
215214
Assert.AreEqual(XLDataType.Text, ws.Cell(11, 9).DataType);
216-
//Assert.AreEqual(XLCellValues.Text, ws.Cell(11, 9).DataType);
217215

218216
range.Clear();
219217
IXLRange newRange2 = ExcelHelper.CopyRange(newRange, ws.Cell(11, 8));
220218

221-
Assert.AreEqual(3, ws.CellsUsed().Count());
219+
Assert.AreEqual(3, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
222220
Assert.AreEqual(newRange.FirstCell(), ws.Cell(10, 8));
223221
Assert.AreEqual(newRange.LastCell(), ws.Cell(13, 10));
224222
Assert.AreEqual("RangeStart", newRange.FirstCell().Value.ToString());
@@ -257,7 +255,7 @@ public void TestCopyNamedRange()
257255
IXLRange newRange = copiedNamedRange.Ranges.ElementAt(0);
258256

259257
Assert.AreEqual(1, copiedNamedRange.Ranges.Count);
260-
Assert.AreEqual(4, ws.CellsUsed().Count());
258+
Assert.AreEqual(4, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
261259
Assert.AreEqual(range.FirstCell(), ws.Cell(6, 5));
262260
Assert.AreEqual(range.LastCell(), ws.Cell(9, 7));
263261
Assert.AreEqual("RangeStart", range.FirstCell().Value.ToString());
@@ -278,7 +276,7 @@ public void TestCopyNamedRange()
278276
IXLRange newRange2 = copiedNamedRange2.Ranges.ElementAt(0);
279277

280278
Assert.AreEqual(1, copiedNamedRange2.Ranges.Count);
281-
Assert.AreEqual(3, ws.CellsUsed().Count());
279+
Assert.AreEqual(3, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
282280
Assert.AreEqual(newRange.FirstCell(), ws.Cell(10, 8));
283281
Assert.AreEqual(newRange.LastCell(), ws.Cell(13, 10));
284282
Assert.AreEqual("RangeStart", newRange.FirstCell().Value.ToString());
@@ -318,7 +316,7 @@ public void TestAllocateSpaceForNextRange()
318316
IXLCell leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
319317
IXLCell leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
320318

321-
Assert.AreEqual(10, ws.CellsUsed().Count());
319+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
322320
Assert.AreEqual(rangeStartCell, ws.Cell(10, 5));
323321
Assert.AreEqual(rangeEndCell, ws.Cell(13, 7));
324322
Assert.AreEqual(belowCell1, ws.Cell(14, 6));
@@ -349,7 +347,7 @@ public void TestAllocateSpaceForNextRange()
349347
leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
350348
leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
351349

352-
Assert.AreEqual(10, ws.CellsUsed().Count());
350+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
353351
Assert.AreEqual(rangeStartCell, ws.Cell(6, 5));
354352
Assert.AreEqual(rangeEndCell, ws.Cell(9, 7));
355353
Assert.AreEqual(belowCell1, ws.Cell(14, 6));
@@ -380,7 +378,7 @@ public void TestAllocateSpaceForNextRange()
380378
leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
381379
leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
382380

383-
Assert.AreEqual(10, ws.CellsUsed().Count());
381+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
384382
Assert.AreEqual(rangeStartCell, ws.Cell(10, 5));
385383
Assert.AreEqual(rangeEndCell, ws.Cell(13, 7));
386384
Assert.AreEqual(belowCell1, ws.Cell(14, 6));
@@ -411,7 +409,7 @@ public void TestAllocateSpaceForNextRange()
411409
leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
412410
leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
413411

414-
Assert.AreEqual(10, ws.CellsUsed().Count());
412+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
415413
Assert.AreEqual(rangeStartCell, ws.Cell(6, 5));
416414
Assert.AreEqual(rangeEndCell, ws.Cell(9, 7));
417415
Assert.AreEqual(belowCell1, ws.Cell(14, 6));
@@ -442,7 +440,7 @@ public void TestAllocateSpaceForNextRange()
442440
leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
443441
leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
444442

445-
Assert.AreEqual(10, ws.CellsUsed().Count());
443+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
446444
Assert.AreEqual(rangeStartCell, ws.Cell(6, 8));
447445
Assert.AreEqual(rangeEndCell, ws.Cell(9, 10));
448446
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
@@ -473,7 +471,7 @@ public void TestAllocateSpaceForNextRange()
473471
leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
474472
leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
475473

476-
Assert.AreEqual(10, ws.CellsUsed().Count());
474+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
477475
Assert.AreEqual(rangeStartCell, ws.Cell(6, 5));
478476
Assert.AreEqual(rangeEndCell, ws.Cell(9, 7));
479477
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
@@ -504,7 +502,7 @@ public void TestAllocateSpaceForNextRange()
504502
leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
505503
leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
506504

507-
Assert.AreEqual(10, ws.CellsUsed().Count());
505+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
508506
Assert.AreEqual(rangeStartCell, ws.Cell(6, 8));
509507
Assert.AreEqual(rangeEndCell, ws.Cell(9, 10));
510508
Assert.AreEqual(belowCell1, ws.Cell(10, 9));
@@ -535,7 +533,7 @@ public void TestAllocateSpaceForNextRange()
535533
leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
536534
leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
537535

538-
Assert.AreEqual(10, ws.CellsUsed().Count());
536+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
539537
Assert.AreEqual(rangeStartCell, ws.Cell(6, 5));
540538
Assert.AreEqual(rangeEndCell, ws.Cell(9, 7));
541539
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
@@ -566,7 +564,7 @@ public void TestAllocateSpaceForNextRange()
566564
leftCell1 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_1");
567565
leftCell2 = ws.Cells().Single(c => c.Value.ToString() == "LeftCell_2");
568566

569-
Assert.AreEqual(10, ws.CellsUsed().Count());
567+
Assert.AreEqual(10, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
570568
Assert.AreEqual(rangeStartCell, ws.Cell(6, 5));
571569
Assert.AreEqual(rangeEndCell, ws.Cell(9, 7));
572570
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
@@ -604,7 +602,7 @@ public void TestDeleteRange()
604602

605603
Assert.IsNull(rangeStartCell);
606604
Assert.IsNull(rangeEndCell);
607-
Assert.AreEqual(8, ws.CellsUsed().Count());
605+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
608606
Assert.AreEqual(belowCell1, ws.Cell(6, 6));
609607
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
610608
Assert.AreEqual(rightCell1, ws.Cell(7, 8));
@@ -636,7 +634,7 @@ public void TestDeleteRange()
636634
Assert.IsNull(rangeEndCell);
637635
Assert.IsNull(leftCell1);
638636
Assert.IsNull(rightCell1);
639-
Assert.AreEqual(6, ws.CellsUsed().Count());
637+
Assert.AreEqual(6, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
640638
Assert.AreEqual(belowCell1, ws.Cell(6, 6));
641639
Assert.AreEqual(belowCell2, ws.Cell(6, 8));
642640
Assert.AreEqual(rightCell2, ws.Cell(5, 8));
@@ -664,7 +662,7 @@ public void TestDeleteRange()
664662

665663
Assert.IsNull(rangeStartCell);
666664
Assert.IsNull(rangeEndCell);
667-
Assert.AreEqual(8, ws.CellsUsed().Count());
665+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
668666
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
669667
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
670668
Assert.AreEqual(rightCell1, ws.Cell(7, 5));
@@ -696,7 +694,7 @@ public void TestDeleteRange()
696694
Assert.IsNull(rangeEndCell);
697695
Assert.IsNull(aboveCell1);
698696
Assert.IsNull(belowCell1);
699-
Assert.AreEqual(6, ws.CellsUsed().Count());
697+
Assert.AreEqual(6, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
700698
Assert.AreEqual(belowCell2, ws.Cell(10, 5));
701699
Assert.AreEqual(rightCell1, ws.Cell(7, 5));
702700
Assert.AreEqual(rightCell2, ws.Cell(5, 5));
@@ -726,7 +724,7 @@ public void TestDeleteRange()
726724
Assert.IsNull(rangeEndCell);
727725
Assert.AreEqual(XLBorderStyleValues.None, range.FirstCell().Style.Border.TopBorder);
728726
Assert.AreEqual(XLBorderStyleValues.None, range.LastCell().Style.Border.BottomBorder);
729-
Assert.AreEqual(8, ws.CellsUsed().Count());
727+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
730728
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
731729
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
732730
Assert.AreEqual(rightCell1, ws.Cell(7, 8));
@@ -757,7 +755,7 @@ public void TestMoveRange()
757755

758756
IXLRange movedRange = ExcelHelper.MoveRange(range, ws.Cell(10, 8));
759757

760-
Assert.AreEqual(2, ws.CellsUsed().Count());
758+
Assert.AreEqual(2, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
761759
Assert.AreEqual(range.FirstCell(), ws.Cell(6, 5));
762760
Assert.AreEqual(range.LastCell(), ws.Cell(9, 7));
763761
Assert.AreEqual(string.Empty, range.FirstCell().Value.ToString());
@@ -771,11 +769,10 @@ public void TestMoveRange()
771769
Assert.AreEqual(XLBorderStyleValues.Thin, movedRange.FirstCell().Style.Border.TopBorder);
772770
Assert.AreEqual(XLBorderStyleValues.Thin, movedRange.LastCell().Style.Border.BottomBorder);
773771
Assert.AreEqual(XLDataType.Text, ws.Cell(11, 9).DataType);
774-
//Assert.AreEqual(XLCellValues.Text, ws.Cell(11, 9).DataType);
775772

776773
IXLRange movedRange2 = ExcelHelper.MoveRange(movedRange, ws.Cell(11, 8));
777774

778-
Assert.AreEqual(2, ws.CellsUsed().Count());
775+
Assert.AreEqual(2, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
779776
Assert.AreEqual(movedRange.FirstCell(), ws.Cell(10, 8));
780777
Assert.AreEqual(movedRange.LastCell(), ws.Cell(13, 10));
781778
Assert.AreEqual(string.Empty, movedRange.FirstCell().Value.ToString());
@@ -808,14 +805,13 @@ public void TestMoveNamedRange()
808805

809806
ws.Cell(11, 9).Value = DateTime.Now;
810807
ws.Cell(11, 9).DataType = XLDataType.DateTime;
811-
//ws.Cell(11, 9).DataType = XLCellValues.DateTime;
812808

813809
IXLNamedRange movedNamedRange = ExcelHelper.MoveNamedRange(namedRange, ws.Cell(10, 8));
814810
IXLRange movedRange = movedNamedRange.Ranges.ElementAt(0);
815811

816812
Assert.AreEqual(movedNamedRange, ws.NamedRange("TestRange"));
817813
Assert.AreEqual(1, movedNamedRange.Ranges.Count);
818-
Assert.AreEqual(2, ws.CellsUsed().Count());
814+
Assert.AreEqual(2, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
819815
Assert.AreEqual(range.FirstCell(), ws.Cell(6, 5));
820816
Assert.AreEqual(range.LastCell(), ws.Cell(9, 7));
821817
Assert.AreEqual(string.Empty, range.FirstCell().Value.ToString());
@@ -829,14 +825,13 @@ public void TestMoveNamedRange()
829825
Assert.AreEqual(XLBorderStyleValues.Thin, movedRange.FirstCell().Style.Border.TopBorder);
830826
Assert.AreEqual(XLBorderStyleValues.Thin, movedRange.LastCell().Style.Border.BottomBorder);
831827
Assert.AreEqual(XLDataType.Text, ws.Cell(11, 9).DataType);
832-
//Assert.AreEqual(XLCellValues.Text, ws.Cell(11, 9).DataType);
833828

834829
IXLNamedRange movedNamedRange2 = ExcelHelper.MoveNamedRange(movedNamedRange, ws.Cell(11, 8));
835830
IXLRange movedRange2 = movedNamedRange2.Ranges.ElementAt(0);
836831

837832
Assert.AreEqual(movedNamedRange2, ws.NamedRange("TestRange"));
838833
Assert.AreEqual(1, movedNamedRange2.Ranges.Count);
839-
Assert.AreEqual(2, ws.CellsUsed().Count());
834+
Assert.AreEqual(2, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
840835
Assert.AreEqual(movedRange.FirstCell(), ws.Cell(10, 8));
841836
Assert.AreEqual(movedRange.LastCell(), ws.Cell(13, 10));
842837
Assert.AreEqual(string.Empty, movedRange.FirstCell().Value.ToString());

ExcelReportGenerator.Tests/Extensions/XLRangeBaseExtensionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void TestCellsUsedWithoutFormulas()
2222
ws.Cell(25, 30).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
2323
ws.Cell(25, 30).FormulaA1 = "=A1+B2";
2424

25-
Assert.AreEqual(5, ws.CellsUsed().Count());
25+
Assert.AreEqual(5, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
2626
Assert.AreEqual(6, ws.CellsUsed(XLCellsUsedOptions.All).Count());
2727
Assert.AreEqual(2, ws.CellsUsedWithoutFormulas().Count());
2828
Assert.AreEqual(3, ws.CellsUsedWithoutFormulas(XLCellsUsedOptions.All).Count());

ExcelReportGenerator.Tests/Rendering/DefaultReportGeneratorTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public void TestRender()
311311
ExcelAssert.AreWorkbooksContentEquals(
312312
TestHelper.GetExpectedWorkbook(nameof(DefaultReportGeneratorTest), nameof(TestRender)), wb);
313313

314-
//wb.SaveAs("test.xlsx");
314+
// wb.SaveAs("test.xlsx");
315315
}
316316

317317
[Test]

ExcelReportGenerator.Tests/Rendering/Panels/ExcelPanels/ExcelNamedPanelTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ public void TestDelete()
604604

605605
Assert.IsNull(rangeStartCell);
606606
Assert.IsNull(rangeEndCell);
607-
Assert.AreEqual(8, ws.CellsUsed().Count());
607+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
608608
Assert.AreEqual(belowCell1, ws.Cell(6, 6));
609609
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
610610
Assert.AreEqual(rightCell1, ws.Cell(7, 8));
@@ -644,7 +644,7 @@ public void TestDelete()
644644
Assert.IsNull(rangeEndCell);
645645
Assert.IsNull(leftCell1);
646646
Assert.IsNull(rightCell1);
647-
Assert.AreEqual(6, ws.CellsUsed().Count());
647+
Assert.AreEqual(6, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
648648
Assert.AreEqual(belowCell1, ws.Cell(6, 6));
649649
Assert.AreEqual(belowCell2, ws.Cell(6, 8));
650650
Assert.AreEqual(rightCell2, ws.Cell(5, 8));
@@ -680,7 +680,7 @@ public void TestDelete()
680680

681681
Assert.IsNull(rangeStartCell);
682682
Assert.IsNull(rangeEndCell);
683-
Assert.AreEqual(8, ws.CellsUsed().Count());
683+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
684684
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
685685
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
686686
Assert.AreEqual(rightCell1, ws.Cell(7, 5));
@@ -721,7 +721,7 @@ public void TestDelete()
721721
Assert.IsNull(rangeEndCell);
722722
Assert.IsNull(aboveCell1);
723723
Assert.IsNull(belowCell1);
724-
Assert.AreEqual(6, ws.CellsUsed().Count());
724+
Assert.AreEqual(6, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
725725
Assert.AreEqual(belowCell2, ws.Cell(10, 5));
726726
Assert.AreEqual(rightCell1, ws.Cell(7, 5));
727727
Assert.AreEqual(rightCell2, ws.Cell(5, 5));
@@ -759,7 +759,7 @@ public void TestDelete()
759759
Assert.IsNull(rangeEndCell);
760760
Assert.AreEqual(XLBorderStyleValues.None, parentRange.Ranges.ElementAt(0).FirstCell().Style.Border.TopBorder);
761761
Assert.AreEqual(XLBorderStyleValues.None, parentRange.Ranges.ElementAt(0).Style.Border.BottomBorder);
762-
Assert.AreEqual(8, ws.CellsUsed().Count());
762+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
763763
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
764764
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
765765
Assert.AreEqual(rightCell1, ws.Cell(7, 8));

ExcelReportGenerator.Tests/Rendering/Panels/ExcelPanels/ExcelPanelTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public void TestDelete()
313313

314314
Assert.IsNull(rangeStartCell);
315315
Assert.IsNull(rangeEndCell);
316-
Assert.AreEqual(8, ws.CellsUsed().Count());
316+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
317317
Assert.AreEqual(belowCell1, ws.Cell(6, 6));
318318
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
319319
Assert.AreEqual(rightCell1, ws.Cell(7, 8));
@@ -346,7 +346,7 @@ public void TestDelete()
346346
Assert.IsNull(rangeEndCell);
347347
Assert.IsNull(leftCell1);
348348
Assert.IsNull(rightCell1);
349-
Assert.AreEqual(6, ws.CellsUsed().Count());
349+
Assert.AreEqual(6, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
350350
Assert.AreEqual(belowCell1, ws.Cell(6, 6));
351351
Assert.AreEqual(belowCell2, ws.Cell(6, 8));
352352
Assert.AreEqual(rightCell2, ws.Cell(5, 8));
@@ -375,7 +375,7 @@ public void TestDelete()
375375

376376
Assert.IsNull(rangeStartCell);
377377
Assert.IsNull(rangeEndCell);
378-
Assert.AreEqual(8, ws.CellsUsed().Count());
378+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
379379
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
380380
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
381381
Assert.AreEqual(rightCell1, ws.Cell(7, 5));
@@ -408,7 +408,7 @@ public void TestDelete()
408408
Assert.IsNull(rangeEndCell);
409409
Assert.IsNull(aboveCell1);
410410
Assert.IsNull(belowCell1);
411-
Assert.AreEqual(6, ws.CellsUsed().Count());
411+
Assert.AreEqual(6, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
412412
Assert.AreEqual(belowCell2, ws.Cell(10, 5));
413413
Assert.AreEqual(rightCell1, ws.Cell(7, 5));
414414
Assert.AreEqual(rightCell2, ws.Cell(5, 5));
@@ -439,7 +439,7 @@ public void TestDelete()
439439
Assert.IsNull(rangeEndCell);
440440
Assert.AreEqual(XLBorderStyleValues.None, range.FirstCell().Style.Border.TopBorder);
441441
Assert.AreEqual(XLBorderStyleValues.None, range.LastCell().Style.Border.BottomBorder);
442-
Assert.AreEqual(8, ws.CellsUsed().Count());
442+
Assert.AreEqual(8, ws.CellsUsed(XLCellsUsedOptions.Contents).Count());
443443
Assert.AreEqual(belowCell1, ws.Cell(10, 6));
444444
Assert.AreEqual(belowCell2, ws.Cell(10, 8));
445445
Assert.AreEqual(rightCell1, ws.Cell(7, 8));

0 commit comments

Comments
 (0)