Loading Deserialized spreadsheet to SFSpreadsheet formats text with Underline

Hello,

When I deserialize a varbinary from SQL Server and load that to an SFSpreadsheet control, the Text in cells is displayed with an Underline.  Then when I remove the underline in the Format Cell dialog, it automatically changes the font to Blue.

Here's the code I use to load the serialized spreadsheet:

         private void LoadWbkForParentGuid(string parent_guid)
        {
            if (!string.IsNullOrEmpty(parent_guid))
            {
                MemoryStream stream = StreamUtils.GetMemoryStreamForParentGuid(parent_guid);
                if (stream != null)
                {
                    try
                    {
                        stream.Seek(0, SeekOrigin.Begin);
                        ExcelEngine engine = new ExcelEngine();
                        IWorkbook workbook = engine.Excel.Workbooks.OpenFromXml(stream, ExcelXmlOpenType.MSExcel);
                        this.spreadsheet.Open(workbook);
                    } catch (Exception ex)
                    {
                        LogMe.Send(this.vm.vm_guid, "Open stream failed.", "Opening serialized workbook failed: " + ex.Message, "red");
                    }
                }
            }
        }

I am saving the spreadsheet from an SfSpreadsheet control to SQL Server using this process:

                MemoryStream serializedBinary = new MemoryStream();
                this.spreadsheet.Workbook.SaveAsXml(serializedBinary, ExcelXmlSaveType.MSExcel);
                
                if (serializedBinary != null)
                {
                    byte[] file = serializedBinary .ToArray();
                       // Then saving to a SQL Server VarBinary(max) field
                       SqlCommand cmd = new SqlCommand();
                         cmd.CommandText = "UPDATE seqnx_binaries SET bin_val = @binValue "
                       cmd.Parameters.Add("@binValue", SqlDbType.VarBinary, file.Length).Value = file;
                }

Is there a way to prevent the file from Underlining the text and the changing the font to Blue?

I have attached an image showing the progression of errors.

Thanks!
Byron

Attachment: SFSpreadsheetSerializeUnderlineProblem_aedf9f2b.zip

1 Reply

TL Thirumurugan Loganathan Syncfusion Team December 18, 2017 12:04 PM UTC

Hi Byron, 
 
We were able to reproduce the issue and validating on it. A support incident has been created under your account to track the status of this issue. Please log on to our support website to check for further updates.     
 
Regards, 
Thirumurugan 


Loader.
Up arrow icon