title: Save an Excel VSTO XSD to disk and persist use with C#
body: <p>I'm not new to programming but I am fairly new to VSTO (not my favorite!). I am working with <strong>Excel 2010, VS 2010 and C#</strong></p>
  
  <p>Within my Excel Workbook project, I have a complex winform that also uses an XSD to manage the data from screen to screen. This works just fine. HOWEVER, what code do I need to make this dataset persist from one use of the form to the next when a user opens &amp; closes the Excel file? Right now the dataset disappears once the form is closed.</p>
  
  <p>I looked at form serialization and this article gets me really close: <a href="http://www.codeproject.com/Articles/12976/How-to-Clone-Serialize-Copy-Paste-a-Windows-Forms" rel="nofollow">http://www.codeproject.com/Articles/12976/How-to-Clone-Serialize-Copy-Paste-a-Windows-Forms</a></p>
  
  <p>But the code above does not support DataGridView controls :(</p>
  
  <p>Regardless, since I already have an XSD that the project and my code is using, there must be another way to save this dataset and then use it on subsequent uses of the Excel sheet. I mean, the structured data is already there - aren't there native operations to save this data and then reload it on form load? </p>
  
  <p>So I'm looking for code to (1) save my structured data to disk and (2) use this saved dataset on subsequent form loads.</p>
  
  <p><strong>OR</strong></p>
  
  <p>Does anyone have code to serialize DataGridView controls? This seems to be a bit of a "white whale" since I cant find it anywhere and the author of the article above has stated that it doesn't exist anywhere. </p>