Closed lucas-v closed 10 years ago
The effective format of the created .xla is .xls file (fileFormet=56). Plus, this file is not opened by Excel2003 (bad file format). I think it's because .xla extension and fileFormat parameter are not matching each other. I had to manually recreate the .xla file to get a true AddIn Excel 2003 file (with extension .xla and fileFormat=18).
Perhaps, set the .IsAddIn property of this workbook to True will solve both problems :
Setting the IsAddIn property to True actually solves the problem of the format. :+1: Does the following code gives a file openable by Excel 2003 — if you have it around ?
Dim wb As Workbook
Set wb = vtkCreateExcelWorkbook()
wb.IsAddin = True
wb.SaveAs "C:\Any\Path\Will\Do\xxxx.xla", FileFormat:=xlAddIn
Debug.Print "xla = " & xlAddIn
Debug.Print "actual = " & wb.FileFormat
' vtkCloseAndKillWorkbook wb
Je n'ai pas de 2003 sous la main ; j'essaie avec la dernière version de VBAToolKit cette semaine chez le client.
The generated XLA is now recognized by Excel : the format is good. But there is a crash because the name of the project should be "VBAToolKit". It doesn't work with "VBAToolKit_2003"
Does renaming the project name manually change anything ? Otherwise an optional "VBProjectName overrride" field must be added in the configuration objects.
Manually renaming the project seems a good workaround: no crash when I did it. A manual operation is not a good practice. The issue will be closed when a complete fix will be done. The simplest way seems to add an optional "projectName" attribute to the XML configuration element.
Good thing we have a working workaround. I'll fix the issue soon.
It's the Story#24 in the IceScrum Backlog. A lot of stories not to be estimated; the next sprint can't be planned.
When saving a workbook with the
xlAddIn
(18) file format, the wb.FileFormat property has the value 56 instead of 18.Code to reproduce
Results are :
Notes
The behaviour for other file formats, such as :
xlOpenXMLWorkbookMacroEnabled
forxlsm
filesxlOpenXMLAddIn
forxlam
filesxlExcel8
forxls
filesis normal.