Skip to content

Commit 0fae551

Browse files
tduguidtduguid
authored andcommitted
#5 Fix Separate Values button fails on column with all zero strings in C# version
1 parent 3d16efa commit 0fae551

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CS/Scripts/Ribbon.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,9 +923,9 @@ public void SeparateValues()
923923

924924
for (int i = 1; i <= m + 1; i++) // by row
925925
{
926-
string cellValue = tbl.Range.Cells[i, columnIndex].Value2.ToString();
927-
if (string.IsNullOrEmpty(cellValue) == false)
926+
if (tbl.Range.Cells[i, columnIndex].Value2 != null)
928927
{
928+
string cellValue = tbl.Range.Cells[i, columnIndex].Value2.ToString();
929929
string[] metadata = cellValue.Split(Properties.Settings.Default.Table_ColumnSeparateValuesDelimiter);
930930
int countValues = metadata.Length - 1;
931931
if (countValues > 0)

0 commit comments

Comments
 (0)