diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs
index 71a72ce..1cbc686 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs
@@ -407,6 +407,13 @@
set
{
FormulaA1 = String.Empty;
+
+ if (value as XLCells != null) throw new ArgumentException("Cannot assign IXLCells object to the cell value.");
+
+ if (SetRangeRows(value)) return;
+
+ if (SetRangeColumns(value)) return;
+
if (SetEnumerable(value)) return;
if (SetRange(value)) return;
@@ -416,6 +423,66 @@
}
}
+ private bool SetRangeColumns(object value)
+ {
+ XLRangeColumns columns = value as XLRangeColumns;
+ if (columns == null)
+ return SetColumns(value);
+
+ XLCell cell = this;
+ foreach (var column in columns)
+ {
+ cell.SetRange(column);
+ cell = cell.CellRight();
+ }
+ return true;
+ }
+
+ private bool SetColumns(object value)
+ {
+ XLColumns columns = value as XLColumns;
+ if (columns == null)
+ return false;
+
+ XLCell cell = this;
+ foreach (var column in columns)
+ {
+ cell.SetRange(column);
+ cell = cell.CellRight();
+ }
+ return true;
+ }
+
+ private bool SetRangeRows(object value)
+ {
+ XLRangeRows rows = value as XLRangeRows;
+ if (rows == null)
+ return SetRows(value);
+
+ XLCell cell = this;
+ foreach (var row in rows)
+ {
+ cell.SetRange(row);
+ cell = cell.CellBelow();
+ }
+ return true;
+ }
+
+ private bool SetRows(object value)
+ {
+ XLRows rows = value as XLRows;
+ if (rows == null)
+ return false;
+
+ XLCell cell = this;
+ foreach (var row in rows)
+ {
+ cell.SetRange(row);
+ cell = cell.CellBelow();
+ }
+ return true;
+ }
+
public IXLTable InsertTable(IEnumerable data)
{
return InsertTable(data, null, true);
diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCellsCollection.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCellsCollection.cs
index 420fb9a..35e4122 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCellsCollection.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCellsCollection.cs
@@ -179,9 +179,9 @@
{
int finalRow = rowEnd > MaxRowUsed ? MaxRowUsed : rowEnd;
int finalColumn = columnEnd > MaxColumnUsed ? MaxColumnUsed : columnEnd;
- for (int co = columnStart; co <= columnEnd; co++)
+ for (int co = columnStart; co <= finalColumn; co++)
{
- for (int ro = rowStart; ro <= rowEnd; ro++)
+ for (int ro = rowStart; ro <= finalRow; ro++)
{
XLCell cell;
if (_cellsDictionary.TryGetValue(new XLSheetPoint(ro, co), out cell)
@@ -336,9 +336,9 @@
public Int32 MinRowInColumn(Int32 column)
{
- XLCell cell;
for (int row = 1; row <= MaxRowUsed; row++)
{
+ XLCell cell;
if (_cellsDictionary.TryGetValue(new XLSheetPoint(row, column), out cell))
return row;
}
@@ -348,9 +348,9 @@
public Int32 MaxRowInColumn(Int32 column)
{
- XLCell cell;
for (int row = MaxRowUsed; row >= 1; row--)
{
+ XLCell cell;
if (_cellsDictionary.TryGetValue(new XLSheetPoint(row, column), out cell))
return row;
}
@@ -360,9 +360,9 @@
public Int32 MinColumnInRow(Int32 row)
{
- XLCell cell;
for (int column = 1; column <= MaxColumnUsed; column++)
{
+ XLCell cell;
if (_cellsDictionary.TryGetValue(new XLSheetPoint(row, column), out cell))
return column;
}
@@ -372,9 +372,9 @@
public Int32 MaxColumnInRow(Int32 row)
{
- XLCell cell;
for (int column = MaxColumnUsed; column >= 1; column--)
{
+ XLCell cell;
if (_cellsDictionary.TryGetValue(new XLSheetPoint(row, column), out cell))
return column;
}
diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/NamedRanges/IXLNamedRange.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/NamedRanges/IXLNamedRange.cs
index a79dfb1..886f1e0 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Excel/NamedRanges/IXLNamedRange.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Excel/NamedRanges/IXLNamedRange.cs
@@ -81,6 +81,11 @@
/// The ranges to remove.
void Remove(IXLRanges ranges);
- String RefersTo { get; }
+
+ IXLNamedRange SetRefersTo(String range);
+ IXLNamedRange SetRefersTo(IXLRangeBase range);
+ IXLNamedRange SetRefersTo(IXLRanges ranges);
+
+ String RefersTo { get; set; }
}
}
diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/NamedRanges/XLNamedRange.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/NamedRanges/XLNamedRange.cs
index 6a15138..d01e44d 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Excel/NamedRanges/XLNamedRange.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Excel/NamedRanges/XLNamedRange.cs
@@ -104,12 +104,38 @@
return retVal;
}
- public String RefersTo { get { return ToString(); } }
+ public String RefersTo
+ {
+ get { return ToString(); }
+ set
+ {
+ _rangeList.Clear();
+ _rangeList.Add(value);
+ }
+ }
internal List RangeList
{
get { return _rangeList; }
set { _rangeList = value; }
}
+
+ public IXLNamedRange SetRefersTo(String range)
+ {
+ RefersTo = range;
+ return this;
+ }
+ public IXLNamedRange SetRefersTo(IXLRangeBase range)
+ {
+ _rangeList.Clear();
+ _rangeList.Add(range.RangeAddress.ToStringFixed(XLReferenceStyle.A1, true))
+ return this;
+ }
+ public IXLNamedRange SetRefersTo(IXLRanges ranges)
+ {
+ _rangeList.Clear();
+ ranges.ForEach(r => _rangeList.Add(r.RangeAddress.ToStringFixed(XLReferenceStyle.A1, true)));
+ return this;
+ }
}
}
diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/PageSetup/XLHFItem.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/PageSetup/XLHFItem.cs
index 7801d2b..7e3ccda 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Excel/PageSetup/XLHFItem.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Excel/PageSetup/XLHFItem.cs
@@ -23,7 +23,7 @@
if(texts.ContainsKey(occurrence))
{
foreach (var hfText in texts[occurrence])
- sb.Append(hfText.HFText);
+ sb.Append(hfText.GetHFText(sb.ToString()));
}
return sb.ToString();
diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/PageSetup/XLHFText.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/PageSetup/XLHFText.cs
index 290fc27..9dc2744 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Excel/PageSetup/XLHFText.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Excel/PageSetup/XLHFText.cs
@@ -13,76 +13,78 @@
}
public XLRichString RichText { get; private set; }
- public String HFText
+ public String GetHFText(String prevText)
{
- get
+ StringBuilder sb = new StringBuilder();
+ var wsFont = _worksheet.Style.Font;
+
+ if (RichText.FontName != null && RichText.FontName != wsFont.FontName)
+ sb.Append("&\"" + RichText.FontName);
+ else
+ sb.Append("&\"-");
+
+ if (RichText.Bold && RichText.Italic)
+ sb.Append(",Bold Italic\"");
+ else if (RichText.Bold)
+ sb.Append(",Bold\"");
+ else if (RichText.Italic)
+ sb.Append(",Italic\"");
+ else
+ sb.Append(",Regular\"");
+
+ if (RichText.FontSize > 0 && Math.Abs(RichText.FontSize - wsFont.FontSize) > ExcelHelper.Epsilon)
+ sb.Append("&" + RichText.FontSize);
+
+ if (RichText.Strikethrough && !wsFont.Strikethrough)
+ sb.Append("&S");
+
+ if (RichText.VerticalAlignment != wsFont.VerticalAlignment)
{
- StringBuilder sb = new StringBuilder();
- var wsFont = _worksheet.Style.Font;
-
- if (RichText.FontName != null && RichText.FontName != wsFont.FontName)
- sb.Append("&\"" + RichText.FontName);
- else
- sb.Append("&\"-");
-
- if (RichText.Bold && RichText.Italic)
- sb.Append(",Bold Italic\"");
- else if (RichText.Bold)
- sb.Append(",Bold\"");
- else if (RichText.Italic)
- sb.Append(",Italic\"");
- else
- sb.Append(",Regular\"");
-
- if (RichText.FontSize > 0 && Math.Abs(RichText.FontSize - wsFont.FontSize) > ExcelHelper.Epsilon)
- sb.Append("&" + RichText.FontSize);
-
- if (RichText.Strikethrough && !wsFont.Strikethrough)
- sb.Append("&S");
-
- if (RichText.VerticalAlignment != wsFont.VerticalAlignment)
- {
- if (RichText.VerticalAlignment == XLFontVerticalTextAlignmentValues.Subscript)
- sb.Append("&Y");
- else if (RichText.VerticalAlignment == XLFontVerticalTextAlignmentValues.Superscript)
- sb.Append("&X");
- }
-
- if(RichText.Underline != wsFont.Underline)
- {
- if (RichText.Underline == XLFontUnderlineValues.Single)
- sb.Append("&U");
- else if (RichText.Underline == XLFontUnderlineValues.Double)
- sb.Append("&E");
- }
-
- if(!RichText.FontColor.Equals(wsFont.FontColor))
- sb.Append("&K" + RichText.FontColor.Color.ToHex().Substring(2));
-
- sb.Append(RichText.Text);
-
- if(RichText.Underline != wsFont.Underline)
- {
- if (RichText.Underline == XLFontUnderlineValues.Single)
- sb.Append("&U");
- else if (RichText.Underline == XLFontUnderlineValues.Double)
- sb.Append("&E");
- }
-
- if (RichText.VerticalAlignment != wsFont.VerticalAlignment)
- {
- if (RichText.VerticalAlignment == XLFontVerticalTextAlignmentValues.Subscript)
- sb.Append("&Y");
- else if (RichText.VerticalAlignment == XLFontVerticalTextAlignmentValues.Superscript)
- sb.Append("&X");
- }
-
- if (RichText.Strikethrough && !wsFont.Strikethrough)
- sb.Append("&S");
-
- return sb.ToString();
+ if (RichText.VerticalAlignment == XLFontVerticalTextAlignmentValues.Subscript)
+ sb.Append("&Y");
+ else if (RichText.VerticalAlignment == XLFontVerticalTextAlignmentValues.Superscript)
+ sb.Append("&X");
}
+
+ if (RichText.Underline != wsFont.Underline)
+ {
+ if (RichText.Underline == XLFontUnderlineValues.Single)
+ sb.Append("&U");
+ else if (RichText.Underline == XLFontUnderlineValues.Double)
+ sb.Append("&E");
+ }
+
+ var lastColorPosition = prevText.LastIndexOf("&K");
+
+ if (
+ (lastColorPosition >= 0 && !RichText.FontColor.Equals(XLColor.FromHtml("#" + prevText.Substring(lastColorPosition + 2, 6))))
+ || (lastColorPosition == -1 && !RichText.FontColor.Equals(wsFont.FontColor))
+ )
+ sb.Append("&K" + RichText.FontColor.Color.ToHex().Substring(2));
+
+ sb.Append(RichText.Text);
+
+ if (RichText.Underline != wsFont.Underline)
+ {
+ if (RichText.Underline == XLFontUnderlineValues.Single)
+ sb.Append("&U");
+ else if (RichText.Underline == XLFontUnderlineValues.Double)
+ sb.Append("&E");
+ }
+
+ if (RichText.VerticalAlignment != wsFont.VerticalAlignment)
+ {
+ if (RichText.VerticalAlignment == XLFontVerticalTextAlignmentValues.Subscript)
+ sb.Append("&Y");
+ else if (RichText.VerticalAlignment == XLFontVerticalTextAlignmentValues.Superscript)
+ sb.Append("&X");
+ }
+
+ if (RichText.Strikethrough && !wsFont.Strikethrough)
+ sb.Append("&S");
+
+ return sb.ToString();
}
-
+
}
}
diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/Ranges/XLRange.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/Ranges/XLRange.cs
index 75c5d76..35fe7d9 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Excel/Ranges/XLRange.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Excel/Ranges/XLRange.cs
@@ -408,12 +408,24 @@
}
public XLRangeColumn FirstColumnUsed(Boolean includeFormats, Func predicate = null)
{
+ if (predicate == null)
+ {
+ Int32 firstColumnUsed = Worksheet.Internals.CellsCollection.FirstColumnUsed(
+ RangeAddress.FirstAddress.RowNumber,
+ RangeAddress.FirstAddress.ColumnNumber,
+ RangeAddress.LastAddress.RowNumber,
+ RangeAddress.LastAddress.ColumnNumber,
+ includeFormats);
+
+ return firstColumnUsed == 0 ? null : Column(firstColumnUsed);
+ }
+
Int32 columnCount = ColumnCount();
for (Int32 co = 1; co <= columnCount; co++)
{
var column = Column(co);
- if (!column.IsEmpty(includeFormats) && (predicate == null || predicate(column)))
+ if (!column.IsEmpty(includeFormats) && predicate(column))
return column;
column.Dispose();
}
@@ -516,12 +528,26 @@
}
public XLRangeRow FirstRowUsed(Boolean includeFormats, Func predicate = null)
{
+ if (predicate == null)
+ {
+ Int32 rowFromCells = Worksheet.Internals.CellsCollection.FirstRowUsed(
+ RangeAddress.FirstAddress.RowNumber,
+ RangeAddress.FirstAddress.ColumnNumber,
+ RangeAddress.LastAddress.RowNumber,
+ RangeAddress.LastAddress.ColumnNumber,
+ includeFormats);
+
+ //Int32 rowFromRows = Worksheet.Internals.RowsCollection.FirstRowUsed(includeFormats);
+
+ return rowFromCells == 0 ? null : Row(rowFromCells);
+ }
+
Int32 rowCount = RowCount();
for (Int32 ro = 1; ro <= rowCount; ro++)
{
var row = Row(ro);
- if (!row.IsEmpty(includeFormats) && (predicate == null || predicate(row)))
+ if (!row.IsEmpty(includeFormats) && predicate(row))
return row;
row.Dispose();
}
diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/Rows/XLRowCollection.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/Rows/XLRowCollection.cs
index b6ce3eb..644dcac 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Excel/Rows/XLRowCollection.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Excel/Rows/XLRowCollection.cs
@@ -16,10 +16,14 @@
get { return _deleted; }
}
+ public Int32 MaxRowUsed;
+
#region IDictionary Members
public void Add(int key, XLRow value)
{
+ if (key > MaxRowUsed) MaxRowUsed = key;
+
if (_deleted.ContainsKey(key))
_deleted.Remove(key);
@@ -62,6 +66,8 @@
public void Add(KeyValuePair item)
{
+ if (item.Key > MaxRowUsed) MaxRowUsed = item.Key;
+
if (_deleted.ContainsKey(item.Key))
_deleted.Remove(item.Key);
diff --git a/ClosedXML/ClosedXML/ClosedXML/ExcelHelper.cs b/ClosedXML/ClosedXML/ClosedXML/ExcelHelper.cs
index cb4a863..6ba8b0c 100644
--- a/ClosedXML/ClosedXML/ClosedXML/ExcelHelper.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/ExcelHelper.cs
@@ -23,7 +23,7 @@
private const Int32 TwoT26 = 26 * 26;
internal static readonly NumberFormatInfo NumberFormatForParse = CultureInfo.InvariantCulture.NumberFormat;
- public static readonly Graphics Graphic = Graphics.FromImage(new Bitmap(32, 32));
+ public static readonly Graphics Graphic = Graphics.FromImage(new Bitmap(200, 200));
public static readonly Double DpiX = Graphic.DpiX;
///
diff --git a/ClosedXML/ClosedXML/ClosedXML/Extensions.cs b/ClosedXML/ClosedXML/ClosedXML/Extensions.cs
index 30bfd5d..8443b32 100644
--- a/ClosedXML/ClosedXML/ClosedXML/Extensions.cs
+++ b/ClosedXML/ClosedXML/ClosedXML/Extensions.cs
@@ -203,10 +203,12 @@
return 0;
var font = GetCachedFont(fontBase);
-
- double fMaxDigitWidth = (double)ExcelHelper.Graphic.MeasureString("X", font).Width;
-
- return Math.Truncate((text.ToCharArray().Count() * fMaxDigitWidth + 5.0) / fMaxDigitWidth * 256.0) / 256.0;
+
+ var textSize = TextRenderer.MeasureText(text, font);
+ double width = (((textSize.Width / (double)7) * 256) - (128 / 7)) / 256;
+ width = (double)decimal.Round((decimal)width + 0.2M, 2);
+
+ return width;
}
private static FontStyle GetFontStyle(IXLFontBase font)
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/ClosedXML_Tests.csproj b/ClosedXML/ClosedXML/ClosedXML_Tests/ClosedXML_Tests.csproj
index 9eb6264..099c415 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/ClosedXML_Tests.csproj
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/ClosedXML_Tests.csproj
@@ -80,6 +80,7 @@
+
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Examples/ColumnsTests.cs b/ClosedXML/ClosedXML/ClosedXML_Tests/Examples/ColumnsTests.cs
index 39a0a01..df5fe5f 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Examples/ColumnsTests.cs
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Examples/ColumnsTests.cs
@@ -27,11 +27,6 @@
{
TestHelper.RunTestExample(@"Columns\DeletingColumns.xlsx");
}
- [TestMethod]
- public void InsertColumns()
- {
- TestHelper.RunTestExample(@"Columns\InsertColumns.xlsx");
- }
}
}
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Examples/RowsTests.cs b/ClosedXML/ClosedXML/ClosedXML_Tests/Examples/RowsTests.cs
index b271ec2..fd7fa76 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Examples/RowsTests.cs
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Examples/RowsTests.cs
@@ -8,11 +8,6 @@
public class RowsTests
{
[TestMethod]
- public void InsertRows()
- {
- TestHelper.RunTestExample(@"Rows\InsertRows.xlsx");
- }
- [TestMethod]
public void RowCells()
{
TestHelper.RunTestExample(@"Rows\RowCells.xlsx");
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Columns/ColumnsTests.cs b/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Columns/ColumnsTests.cs
index f5ec5c6..999af25 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Columns/ColumnsTests.cs
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Columns/ColumnsTests.cs
@@ -1,6 +1,7 @@
using ClosedXML.Excel;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
+using System.Linq;
namespace ClosedXML_Tests.Excel
{
@@ -41,5 +42,169 @@
Assert.AreEqual(0, count);
}
+
+ [TestMethod]
+ public void InsertingColumnsBefore1()
+ {
+ var wb = new XLWorkbook();
+ var ws = wb.Worksheets.Add("Sheet1");
+
+ ws.Columns("1,3").Style.Fill.SetBackgroundColor(XLColor.Red);
+ ws.Column(2).Style.Fill.SetBackgroundColor(XLColor.Yellow);
+ ws.Cell(2, 2).SetValue("X").Style.Fill.SetBackgroundColor(XLColor.Green);
+
+ var column1 = ws.Column(1);
+ var column2 = ws.Column(2);
+ var column3 = ws.Column(3);
+
+ var columnIns = ws.Column(1).InsertColumnsBefore(1).First();
+
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, ws.Column(1).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, ws.Column(1).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, ws.Column(1).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Column(2).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(2).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(2).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, ws.Column(3).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, ws.Column(3).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, ws.Column(3).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", ws.Column(3).Cell(2).GetString());
+
+
+
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, columnIns.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, columnIns.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, columnIns.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, column1.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column1.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column1.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, column2.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, column2.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, column2.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, column3.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column3.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column3.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", column2.Cell(2).GetString());
+ }
+
+ [TestMethod]
+ public void InsertingColumnsBefore2()
+ {
+ var wb = new XLWorkbook();
+ var ws = wb.Worksheets.Add("Sheet1");
+
+ ws.Columns("1,3").Style.Fill.SetBackgroundColor(XLColor.Red);
+ ws.Column(2).Style.Fill.SetBackgroundColor(XLColor.Yellow);
+ ws.Cell(2, 2).SetValue("X").Style.Fill.SetBackgroundColor(XLColor.Green);
+
+ var column1 = ws.Column(1);
+ var column2 = ws.Column(2);
+ var column3 = ws.Column(3);
+
+ var columnIns = ws.Column(2).InsertColumnsBefore(1).First();
+
+ Assert.AreEqual(XLColor.Red, ws.Column(1).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(1).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(1).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Column(2).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(2).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(2).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, ws.Column(3).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, ws.Column(3).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, ws.Column(3).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", ws.Column(3).Cell(2).GetString());
+
+
+
+ Assert.AreEqual(XLColor.Red, columnIns.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, columnIns.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, columnIns.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, column1.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column1.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column1.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, column2.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, column2.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, column2.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, column3.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column3.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column3.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", column2.Cell(2).GetString());
+ }
+
+ [TestMethod]
+ public void InsertingColumnsBefore3()
+ {
+ var wb = new XLWorkbook();
+ var ws = wb.Worksheets.Add("Sheet1");
+
+ ws.Columns("1,3").Style.Fill.SetBackgroundColor(XLColor.Red);
+ ws.Column(2).Style.Fill.SetBackgroundColor(XLColor.Yellow);
+ ws.Cell(2, 2).SetValue("X").Style.Fill.SetBackgroundColor(XLColor.Green);
+
+ var column1 = ws.Column(1);
+ var column2 = ws.Column(2);
+ var column3 = ws.Column(3);
+
+ var columnIns = ws.Column(3).InsertColumnsBefore(1).First();
+
+ Assert.AreEqual(XLColor.Red, ws.Column(1).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(1).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(1).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, ws.Column(2).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, ws.Column(2).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, ws.Column(2).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, ws.Column(3).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, ws.Column(3).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, ws.Column(3).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Column(4).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", ws.Column(2).Cell(2).GetString());
+
+
+ Assert.AreEqual(XLColor.Yellow, columnIns.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, columnIns.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, columnIns.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, column1.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column1.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column1.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, column2.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, column2.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, column2.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, column3.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column3.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, column3.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", column2.Cell(2).GetString());
+ }
}
}
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Ranges/CopyingRangesTests.cs b/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Ranges/CopyingRangesTests.cs
new file mode 100644
index 0000000..a24fcdd
--- /dev/null
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Ranges/CopyingRangesTests.cs
@@ -0,0 +1,89 @@
+using ClosedXML.Excel;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Linq;
+using System;
+using System.IO;
+using System.Drawing;
+
+namespace ClosedXML_Tests
+{
+ [TestClass]
+ public class CopyingRangesTests
+ {
+ [TestMethod]
+ public void CopyingRows()
+ {
+ var wb = new XLWorkbook();
+ var ws = wb.Worksheets.Add("Sheet");
+
+ var row1 = ws.Row(1);
+ row1.Cell(1).Style.Fill.SetBackgroundColor(XLColor.Red);
+ row1.Cell(2).Style.Fill.SetBackgroundColor(XLColor.FromArgb(1,1,1));
+ row1.Cell(3).Style.Fill.SetBackgroundColor(XLColor.FromHtml("#CCCCCC"));
+ row1.Cell(4).Style.Fill.SetBackgroundColor(XLColor.FromIndex(26));
+ row1.Cell(5).Style.Fill.SetBackgroundColor(XLColor.FromKnownColor(KnownColor.MediumSeaGreen));
+ row1.Cell(6).Style.Fill.SetBackgroundColor(XLColor.FromName("Blue"));
+ row1.Cell(7).Style.Fill.SetBackgroundColor(XLColor.FromTheme(XLThemeColor.Accent3));
+
+ ws.Cell(2, 1).Value = row1;
+ ws.Cell(3, 1).Value = row1.Row(1, 7);
+
+ var row2 = ws.Row(2);
+ Assert.AreEqual(XLColor.Red, row2.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromArgb(1, 1, 1), row2.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromHtml("#CCCCCC"), row2.Cell(3).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromIndex(26), row2.Cell(4).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromKnownColor(KnownColor.MediumSeaGreen), row2.Cell(5).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromName("Blue"), row2.Cell(6).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromTheme(XLThemeColor.Accent3), row2.Cell(7).Style.Fill.BackgroundColor);
+
+ var row3 = ws.Row(3);
+ Assert.AreEqual(XLColor.Red, row3.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromArgb(1, 1, 1), row3.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromHtml("#CCCCCC"), row3.Cell(3).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromIndex(26), row3.Cell(4).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromKnownColor(KnownColor.MediumSeaGreen), row3.Cell(5).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromName("Blue"), row3.Cell(6).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromTheme(XLThemeColor.Accent3), row3.Cell(7).Style.Fill.BackgroundColor);
+ }
+
+ [TestMethod]
+ public void CopyingColumns()
+ {
+ var wb = new XLWorkbook();
+ var ws = wb.Worksheets.Add("Sheet");
+
+ var column1 = ws.Column(1);
+ column1.Cell(1).Style.Fill.SetBackgroundColor(XLColor.Red);
+ column1.Cell(2).Style.Fill.SetBackgroundColor(XLColor.FromArgb(1, 1, 1));
+ column1.Cell(3).Style.Fill.SetBackgroundColor(XLColor.FromHtml("#CCCCCC"));
+ column1.Cell(4).Style.Fill.SetBackgroundColor(XLColor.FromIndex(26));
+ column1.Cell(5).Style.Fill.SetBackgroundColor(XLColor.FromKnownColor(KnownColor.MediumSeaGreen));
+ column1.Cell(6).Style.Fill.SetBackgroundColor(XLColor.FromName("Blue"));
+ column1.Cell(7).Style.Fill.SetBackgroundColor(XLColor.FromTheme(XLThemeColor.Accent3));
+
+ ws.Cell(1, 2).Value = column1;
+ ws.Cell(1, 3).Value = column1.Column(1, 7);
+
+ var column2 = ws.Column(2);
+ Assert.AreEqual(XLColor.Red, column2.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromArgb(1, 1, 1), column2.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromHtml("#CCCCCC"), column2.Cell(3).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromIndex(26), column2.Cell(4).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromKnownColor(KnownColor.MediumSeaGreen), column2.Cell(5).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromName("Blue"), column2.Cell(6).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromTheme(XLThemeColor.Accent3), column2.Cell(7).Style.Fill.BackgroundColor);
+
+ var column3 = ws.Column(3);
+ Assert.AreEqual(XLColor.Red, column3.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromArgb(1, 1, 1), column3.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromHtml("#CCCCCC"), column3.Cell(3).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromIndex(26), column3.Cell(4).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromKnownColor(KnownColor.MediumSeaGreen), column3.Cell(5).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromName("Blue"), column3.Cell(6).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.FromTheme(XLThemeColor.Accent3), column3.Cell(7).Style.Fill.BackgroundColor);
+ }
+
+
+ }
+}
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Rows/RowsTests.cs b/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Rows/RowsTests.cs
index 3023f0a..fdbe11c 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Rows/RowsTests.cs
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Excel/Rows/RowsTests.cs
@@ -1,6 +1,7 @@
using ClosedXML.Excel;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
+using System.Linq;
namespace ClosedXML_Tests.Excel
{
@@ -42,5 +43,169 @@
Assert.AreEqual(0, count);
}
+
+ [TestMethod]
+ public void InsertingRowsAbove1()
+ {
+ var wb = new XLWorkbook();
+ var ws = wb.Worksheets.Add("Sheet1");
+
+ ws.Rows("1,3").Style.Fill.SetBackgroundColor(XLColor.Red);
+ ws.Row(2).Style.Fill.SetBackgroundColor(XLColor.Yellow);
+ ws.Cell(2, 2).SetValue("X").Style.Fill.SetBackgroundColor(XLColor.Green);
+
+ var row1 = ws.Row(1);
+ var row2 = ws.Row(2);
+ var row3 = ws.Row(3);
+
+ var rowIns = ws.Row(1).InsertRowsAbove(1).First();
+
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, ws.Row(1).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, ws.Row(1).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, ws.Row(1).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Row(2).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(2).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(2).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, ws.Row(3).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, ws.Row(3).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, ws.Row(3).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", ws.Row(3).Cell(2).GetString());
+
+
+
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, rowIns.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, rowIns.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(ws.Style.Fill.BackgroundColor, rowIns.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, row1.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row1.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row1.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, row2.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, row2.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, row2.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, row3.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row3.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row3.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", row2.Cell(2).GetString());
+ }
+
+ [TestMethod]
+ public void InsertingRowsAbove2()
+ {
+ var wb = new XLWorkbook();
+ var ws = wb.Worksheets.Add("Sheet1");
+
+ ws.Rows("1,3").Style.Fill.SetBackgroundColor(XLColor.Red);
+ ws.Row(2).Style.Fill.SetBackgroundColor(XLColor.Yellow);
+ ws.Cell(2, 2).SetValue("X").Style.Fill.SetBackgroundColor(XLColor.Green);
+
+ var row1 = ws.Row(1);
+ var row2 = ws.Row(2);
+ var row3 = ws.Row(3);
+
+ var rowIns = ws.Row(2).InsertRowsAbove(1).First();
+
+ Assert.AreEqual(XLColor.Red, ws.Row(1).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(1).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(1).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Row(2).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(2).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(2).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, ws.Row(3).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, ws.Row(3).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, ws.Row(3).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", ws.Row(3).Cell(2).GetString());
+
+
+
+ Assert.AreEqual(XLColor.Red, rowIns.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, rowIns.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, rowIns.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, row1.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row1.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row1.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, row2.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, row2.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, row2.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, row3.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row3.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row3.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", row2.Cell(2).GetString());
+ }
+
+ [TestMethod]
+ public void InsertingRowsAbove3()
+ {
+ var wb = new XLWorkbook();
+ var ws = wb.Worksheets.Add("Sheet1");
+
+ ws.Rows("1,3").Style.Fill.SetBackgroundColor(XLColor.Red);
+ ws.Row(2).Style.Fill.SetBackgroundColor(XLColor.Yellow);
+ ws.Cell(2, 2).SetValue("X").Style.Fill.SetBackgroundColor(XLColor.Green);
+
+ var row1 = ws.Row(1);
+ var row2 = ws.Row(2);
+ var row3 = ws.Row(3);
+
+ var rowIns = ws.Row(3).InsertRowsAbove(1).First();
+
+ Assert.AreEqual(XLColor.Red, ws.Row(1).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(1).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(1).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, ws.Row(2).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, ws.Row(2).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, ws.Row(2).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, ws.Row(3).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, ws.Row(3).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, ws.Row(3).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, ws.Row(4).Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", ws.Row(2).Cell(2).GetString());
+
+
+ Assert.AreEqual(XLColor.Yellow, rowIns.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, rowIns.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, rowIns.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, row1.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row1.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row1.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Yellow, row2.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Green, row2.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Yellow, row2.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual(XLColor.Red, row3.Cell(1).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row3.Cell(2).Style.Fill.BackgroundColor);
+ Assert.AreEqual(XLColor.Red, row3.Cell(3).Style.Fill.BackgroundColor);
+
+ Assert.AreEqual("X", row2.Cell(2).GetString());
+ }
}
}
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/AutoFilter/RegularAutoFilter.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/AutoFilter/RegularAutoFilter.xlsx
index f3949e9..1b57c98 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/AutoFilter/RegularAutoFilter.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/AutoFilter/RegularAutoFilter.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Comments/AddingComments.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Comments/AddingComments.xlsx
index 419d743..a7605d2 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Comments/AddingComments.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Comments/AddingComments.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Loading/ChangingBasicTable.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Loading/ChangingBasicTable.xlsx
index 2bf81ee..98f695d 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Loading/ChangingBasicTable.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Loading/ChangingBasicTable.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AddingDataSet.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AddingDataSet.xlsx
index 17b6bf2..e81594f 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AddingDataSet.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AddingDataSet.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AddingDataTableAsWorksheet.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AddingDataTableAsWorksheet.xlsx
index c1b076e..3373336 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AddingDataTableAsWorksheet.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AddingDataTableAsWorksheet.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AdjustToContents.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AdjustToContents.xlsx
index 2b6d6f4..ba8688f 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AdjustToContents.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AdjustToContents.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AutoFilter.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AutoFilter.xlsx
index 68367ed..ba83f2e 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AutoFilter.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/AutoFilter.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/BasicTable.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/BasicTable.xlsx
index 67c2cd3..87f9f60 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/BasicTable.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/BasicTable.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/BlankCells.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/BlankCells.xlsx
index 571a2b6..6db0a62 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/BlankCells.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/BlankCells.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CellValues.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CellValues.xlsx
index fd0fb9f..3297ac0 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CellValues.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CellValues.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Collections.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Collections.xlsx
index 7274d35..1713c05 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Collections.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Collections.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CopyingRowsAndColumns.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CopyingRowsAndColumns.xlsx
index a0fd524..62f2350 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CopyingRowsAndColumns.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CopyingRowsAndColumns.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CopyingWorksheets.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CopyingWorksheets.xlsx
index bd8784d..c26390b 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CopyingWorksheets.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/CopyingWorksheets.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/DataTypes.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/DataTypes.xlsx
index 20c778e..6f11d5a 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/DataTypes.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/DataTypes.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/DataValidation.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/DataValidation.xlsx
index 8f8d597..c00d8e1 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/DataValidation.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/DataValidation.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Formulas.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Formulas.xlsx
index afdd51f..62c037b 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Formulas.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Formulas.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/FreezePanes.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/FreezePanes.xlsx
index 92a890b..44fb69c 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/FreezePanes.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/FreezePanes.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/HideSheets.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/HideSheets.xlsx
index 808b772..28bb170 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/HideSheets.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/HideSheets.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/HideUnhide.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/HideUnhide.xlsx
index a1ac84b..f622b8c 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/HideUnhide.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/HideUnhide.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Hyperlinks.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Hyperlinks.xlsx
index 0d072ed..5d1f631 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Hyperlinks.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Hyperlinks.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/InsertingData.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/InsertingData.xlsx
index 598701a..2646aab 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/InsertingData.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/InsertingData.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/InsertingTables.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/InsertingTables.xlsx
index bc1643f..739b576 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/InsertingTables.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/InsertingTables.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/LambdaExpressions.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/LambdaExpressions.xlsx
index 78deb96..f66ba77 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/LambdaExpressions.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/LambdaExpressions.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MergeCells.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MergeCells.xlsx
index a98d343..8eb3bab 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MergeCells.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MergeCells.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MergeMoves.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MergeMoves.xlsx
index 066bd9a..0cebd6f 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MergeMoves.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MergeMoves.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MultipleSheets.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MultipleSheets.xlsx
index d198808..6e90997 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MultipleSheets.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/MultipleSheets.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Outline.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Outline.xlsx
index cdc1477..22ba1bb 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Outline.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/Outline.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/SheetProtection.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/SheetProtection.xlsx
index 28a2214..8b68395 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/SheetProtection.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/SheetProtection.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/ShiftingFormulas.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/ShiftingFormulas.xlsx
index 127cdcb..46a0c72 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/ShiftingFormulas.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/ShiftingFormulas.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/ShowCase.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/ShowCase.xlsx
index c25c61d..b0f3982 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/ShowCase.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/ShowCase.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/TabColors.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/TabColors.xlsx
index 8552b9f..f82a11d 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/TabColors.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/TabColors.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/WorkbookProperties.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/WorkbookProperties.xlsx
index 916ea07..77330bf 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/WorkbookProperties.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Misc/WorkbookProperties.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/PageSetup/HeaderFooters.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/PageSetup/HeaderFooters.xlsx
index 1fbf970..6b5ca8b 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/PageSetup/HeaderFooters.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/PageSetup/HeaderFooters.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/ClearingRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/ClearingRanges.xlsx
index 2f9fa1a..0e43e7a 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/ClearingRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/ClearingRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/CopyingRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/CopyingRanges.xlsx
index bdedeee..544611e 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/CopyingRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/CopyingRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/CurrentRowColumn.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/CurrentRowColumn.xlsx
index f1b544e..adba6a0 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/CurrentRowColumn.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/CurrentRowColumn.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/DefiningRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/DefiningRanges.xlsx
index 20f38fd..a33f5d3 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/DefiningRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/DefiningRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/DeletingRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/DeletingRanges.xlsx
index b83f747..f76213e 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/DeletingRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/DeletingRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/InsertingDeletingColumns.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/InsertingDeletingColumns.xlsx
index 288654b..9695c0b 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/InsertingDeletingColumns.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/InsertingDeletingColumns.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/InsertingDeletingRows.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/InsertingDeletingRows.xlsx
index 51319ad..f52daad 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/InsertingDeletingRows.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/InsertingDeletingRows.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/MultipleRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/MultipleRanges.xlsx
index 46476d7..1c7deb6 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/MultipleRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/MultipleRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/NamedRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/NamedRanges.xlsx
index ee79318..36db2b4 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/NamedRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/NamedRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/ShiftingRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/ShiftingRanges.xlsx
index 65de4b4..07ffc4d 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/ShiftingRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/ShiftingRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/SortExample.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/SortExample.xlsx
index 133bf9d..6f38430 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/SortExample.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/SortExample.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/Sorting.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/Sorting.xlsx
index fff981b..31cde55 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/Sorting.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/Sorting.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/TransposeRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/TransposeRanges.xlsx
index 693f169..7c3e934 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/TransposeRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/TransposeRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/TransposeRangesPlus.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/TransposeRangesPlus.xlsx
index 90c6baa..72e769f 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/TransposeRangesPlus.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/TransposeRangesPlus.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/UsingTables.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/UsingTables.xlsx
index 59f98ce..e1a46bc 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/UsingTables.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/UsingTables.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/WalkingRanges.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/WalkingRanges.xlsx
index 8b460a0..cb62723 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/WalkingRanges.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Ranges/WalkingRanges.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/DefaultStyles.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/DefaultStyles.xlsx
index 1797701..3744a07 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/DefaultStyles.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/DefaultStyles.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/PurpleWorksheet.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/PurpleWorksheet.xlsx
index 87dba20..ea8912e 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/PurpleWorksheet.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/PurpleWorksheet.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleAlignment.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleAlignment.xlsx
index 7ea1f1e..04c0134 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleAlignment.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleAlignment.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleBorder.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleBorder.xlsx
index 7bbdf0d..679e4ab 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleBorder.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleBorder.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleFill.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleFill.xlsx
index 00778df..277b13e 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleFill.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleFill.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleFont.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleFont.xlsx
index 3362323..7f4cc84 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleFont.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleFont.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleNumberFormat.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleNumberFormat.xlsx
index 6d68bbd..6f05e10 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleNumberFormat.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleNumberFormat.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleRowsColumns.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleRowsColumns.xlsx
index e0ff99b..390b36a 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleRowsColumns.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleRowsColumns.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleWorksheet.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleWorksheet.xlsx
index 8484268..cb49a3e 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleWorksheet.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/StyleWorksheet.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/UsingColors.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/UsingColors.xlsx
index e80ba4e..73bedcd 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/UsingColors.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/UsingColors.xlsx
Binary files differ
diff --git a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/UsingRichText.xlsx b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/UsingRichText.xlsx
index 779874e..22ca2c4 100644
--- a/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/UsingRichText.xlsx
+++ b/ClosedXML/ClosedXML/ClosedXML_Tests/Resource/Examples/Styles/UsingRichText.xlsx
Binary files differ