This project has moved. For the latest updates, please go here.

When opening a workbook including a comma symbol in a worksheet name, an exception occurs certainly.

May 10, 2016 at 7:19 AM
I had found source code of this problem, and fixed.
    //[XLWorkbook_Load.cs]
    //Original
    private void LoadPrintTitles(DefinedName definedName)
    {
      var areas = definedName.Text.Split(',');
      if (areas.Length > 0)
      {
        foreach (var item in areas)
        {
          SetColumnsOrRowsToRepeat(item);
        }
        return;
      }

      SetColumnsOrRowsToRepeat(definedName.Text);
    }

    //Fix
    private void LoadPrintTitles(DefinedName definedName)
    {
      var areas = definedName.Text.Split(',');
      if (areas.Length > 0)
      {
        string concatitem = "";
        foreach (var item in areas)
        {
          concatitem += item;
          if (concatitem.StartsWith("'") && !concatitem.Substring(1).Contains("'"))
          {
            concatitem += ",";
            continue;
          }
          SetColumnsOrRowsToRepeat(concatitem);
          concatitem = "";
        }
        return;
      }

      SetColumnsOrRowsToRepeat(definedName.Text);
    }