private void loadToolStripMenuItem_Click(object sender, EventArgs e) { this.openFileDialog.ShowDialog(); //Get the file the user wants to load if (openFileDialog.FileName != "") { test.Clear(); //Clear the current contents of the sheet test.clearUndo(); //Clear the undo stack test.clearRedo(); //Clear the redo stack Stream loadStream = this.openFileDialog.OpenFile(); //Open the file as a stream this.test.Load(loadStream); //Load the stream into the spreadsheet } }