Unplanned
Last Updated: 31 Oct 2018 08:13 by ADMIN
ADMIN
Tanya
Created on: 03 Jun 2016 14:45
Category: Spreadsheet
Type: Bug Report
1
Spreadsheet: WorkbookContentChanged is fired just after importing a document
Workaround: Import the document without using the default command

OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "All Spreadsheet Files (*.txt, *.csv, *.pdf, *.xlsx)|*.txt;*.csv;*.pdf;*.xlsx|Excel Workbook (*.xlsx)|*.xlsx|CSV (Comma delimited) (*.csv)|*.csv|Text (Tab delimited) (*.txt)|*.txt|All Files (*.*)|*.*";
if (openFileDialog.ShowDialog() == true)
{
    string extension = Path.GetExtension(openFileDialog.SafeFileName);
    using (Stream input = openFileDialog.OpenFile())
    {
        Workbook workbook = WorkbookFormatProvidersManager.Import(extension, input);
        workbook.Name = openFileDialog.SafeFileName; // in the default implementation this is set after applying the document to RadSpreadsheet and triggers the event
       
        this.radSpreadsheet.Workbook = workbook;
    }
}
0 comments