Saving .xlsx with savefiledialog, he "pretend" to save mas when i try to open says that the archive is corrupted or the extension is not valid

  • Thread starter Thread starter Gustavo Nikov
  • Start date Start date
G

Gustavo Nikov

Guest
i took this code from some site and i adapted to my but, this open the dialog and i can even write the name and click save and everything sims fine. When i go to open the file that i saved, is how the file as never saved, because says that "The excel can not open the file 'name.xlsx' because the format or the extension of the file is not valid. Verify if the file is not corrupted and if the extension corresponds to the file format"
Dim myStream As Object
If SaveFileDialog1.ShowDialog() = DialogResult.OK Then
myStream = SaveFileDialog1.OpenFile()
If (myStream IsNot Nothing) Then

myStream.Close()
End If
End If

detail: i created a savefiledialog box on the design, i configured like this:

DefaultExt: .xlsx

Filename: GeshemProject(the name that i choose)

Continue reading...
 
Back
Top