diff --git a/shared_strings.go b/shared_strings.go index d792772..cf4d121 100644 --- a/shared_strings.go +++ b/shared_strings.go @@ -38,7 +38,7 @@ func (sv *sharedStringsValue) String() string { // Reset zeroes data inside struct. func (sv *sharedStringsValue) Reset() { sv.Text = "" - sv.RichText = sv.RichText[0:] + sv.RichText = sv.RichText[:0] } // Sentinel error to indicate that no shared strings file can be found diff --git a/shared_strings_test.go b/shared_strings_test.go index 7c4c163..8c3ce20 100644 --- a/shared_strings_test.go +++ b/shared_strings_test.go @@ -42,4 +42,12 @@ func TestLoadingSharedStrings(t *testing.T) { require.Equal(t, []string{"rec_id", "culture", "sex"}, actual.sharedStrings) }) } + + t.Run("bold", func(t *testing.T) { + actual, err := OpenFile("./test/test-bold.xlsx") + require.NoError(t, err) + defer actual.Close() + + require.Equal(t, []string{"Contact ID", "Phone Number"}, actual.sharedStrings) + }) } diff --git a/test/test-bold.xlsx b/test/test-bold.xlsx new file mode 100644 index 0000000..6c9ba4a Binary files /dev/null and b/test/test-bold.xlsx differ