I have an existing xls file (created in Excel) and using Aspose.cells I open the file, change the formula in one cell and write the file back out. I open and save using 97to2003 format. After saving the file with Aspose, when I open it with Excel 2007 I get the error "Office File Validation detected a problem while trying to open this file. Opening it may be dangerous." The file does open if I click Open and appears ok. I'm using the most current dll I could find (184.108.40.206).
The code I'm running is below. Note that I've tried using a filestream to write the workbook back out (using filemode.create) with no difference.
Sub FixWeeklyDate(ByVal strName As String)
Dim workbook As Workbook
Using fsworkbook As FileStream = New FileStream(strName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
Dim loOptions As LoadOptions = New LoadOptions(LoadFormat.Excel97To2003)
workbook = New Workbook(fsworkbook, loOptions)
workbook.Worksheets("Weekly Data").Cells(8, 0).Formula = "=INDEX('Daily Data'!A9:A5000,7-(MOD(INDIRECT(""'Daily Data'!A9"")-DATE(2006,9,29),7)),1)"
Dim strSaveName As String
strSaveName = "c:\SQLDiff\" & strName