From 0fae55164c8d09f3324f64fb27048e5ded7bfeca Mon Sep 17 00:00:00 2001 From: tduguid Date: Sun, 14 Jan 2018 11:23:41 +1100 Subject: [PATCH] #5 Fix Separate Values button fails on column with all zero strings in C# version --- CS/Scripts/Ribbon.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CS/Scripts/Ribbon.cs b/CS/Scripts/Ribbon.cs index ad54467..7525700 100644 --- a/CS/Scripts/Ribbon.cs +++ b/CS/Scripts/Ribbon.cs @@ -923,9 +923,9 @@ public void SeparateValues() for (int i = 1; i <= m + 1; i++) // by row { - string cellValue = tbl.Range.Cells[i, columnIndex].Value2.ToString(); - if (string.IsNullOrEmpty(cellValue) == false) + if (tbl.Range.Cells[i, columnIndex].Value2 != null) { + string cellValue = tbl.Range.Cells[i, columnIndex].Value2.ToString(); string[] metadata = cellValue.Split(Properties.Settings.Default.Table_ColumnSeparateValuesDelimiter); int countValues = metadata.Length - 1; if (countValues > 0)