title: XpsDocument.GetFixedDocumentSequence throws XamlParseException
body: <p>I have to import an <code>.xlsx</code> file into my WPF application and view it. I convert the document to .<code>xps</code> and then loading. After that I call <code>GetFixedDocumentSequence()</code> and there I get this Exception</p>
  
  <blockquote>
    <p>XamlParseException:</p>
    
    <p>{"UnicodeString property does not contain enough characters to
    correspond to the contents of Indices property."}.</p>
  </blockquote>
  
  <p>here is my code:</p>
  
  <pre><code>private void LoadData()
  {
      string xpsPath = ViewDocumentViewer("D:\\test.xlsx");
      DisplayXPSFile(xpsPath);
  }
  
  private string ViewDocumentViewer(string path)
  {
      try
      {
          string xpsPath;
          var excelApp = new Microsoft.Office.Interop.Excel.Application();
          excelApp.DisplayAlerts = false;
          excelApp.Visible = false;
          Microsoft.Office.Interop.Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(path);
          xpsPath = ExportXPS(excelWorkbook, path);
          excelWorkbook.Close(false, null, null);
          excelApp.Quit();
          Marshal.ReleaseComObject(excelApp);
          excelApp = null;
  
          return xpsPath;
      }
      catch
      { 
      }
  
      return string.Empty;
  }
  
  string ExportXPS(Microsoft.Office.Interop.Excel.Workbook excelWorkbook, string path)
  {
      string xpsFileName;
      xpsFileName = (new DirectoryInfo(path)).FullName;
      xpsFileName = xpsFileName.Replace(new FileInfo(path).Extension, "") + ".xps";
      excelWorkbook.ExportAsFixedFormat(XlFixedFormatType.xlTypeXPS,
      Filename: xpsFileName,
      OpenAfterPublish: false);
  
      return xpsFileName;
  }
  
  void DisplayXPSFile(string xpsFileName)
  {
      XpsDocument xpsPackage = new XpsDocument(xpsFileName, FileAccess.Read, CompressionOption.NotCompressed);
      FixedDocumentSequence fixedDocumentSequence = xpsPackage.GetFixedDocumentSequence();
      DocView.Document = fixedDocumentSequence;
  }
  </code></pre>