Free Support Forum -

Document not Saved

I am having a strange problem with a spreadsheet I've created with your control. It opens and edits just fine in Excel, but when I try to perform a Save or Save As, I get a "Document Not Saved" msgbox. I'm using with the following code in a .Net 2.0 windows service.

Public Function GenerateFile(ByVal drForm As DataRow, ByVal _ar As ArrayList, ByVal filename As String) As Boolean
'Set the licensing for the Aspose.Cells control
Dim license As Aspose.Cells.License = New Aspose.Cells.License

Dim _excel As New Excel
_excel.Open(My.Settings.TemplateFolderPath & drForm("template"))
Dim _wk As Worksheet = _excel.Worksheets(0)

'Dim _dr As DataRow = drData(0)
Dim _mac As clsMachine = _ar.Item(0)

'A bunch of _wk.Cells(row, col).PutValue() statements


Return True
Catch ex As Exception
Throw ex

Return False
End Try

End Function



Turns out it is actually an Excel bug. If you use a template with embedded objects, this may happen. I've updated my template to remove them, and its no longer an issue.

See;en-us;121942&Product=xlw97 for more detail.