Have a script for DxDesigner that generates a BOM in new Excel workbook, but I can not save the workbook.
Does any one know how to do this?
I think you use the "BOM"-Frameset from the AATK tools.
We are using Office 2010.
This is what I did to write an Excelfile ...
In our Case:
* sTopBlock is the top level schematic
* prjPath is the path of the project
prjPath = vdapp.GetProjectData.GetProjectPath
FileNameStr = prjPath & "\" & sTopBlock & "_BOM_13.xlsx"
s_ObjXL.ActiveWorkbook.SaveAs FileNameStr, 51
I hope this works for you.
Thank for the answer. It works.
If have a small additional problem.
I'm trying to save, but the file already exits.
I tried 2 options:
The save option SaveChanges:=True is not recognized.
s_ObjXL.ActiveWorkbook.SaveAs fOutputFileName.Text, 51, SaveChanges:=True
The commanda Dir and Kill are not recognized.
if BOM_File <> "" then
Do you have a suggestion on how I can solve this?
Try following approach:
A very good summary can be found at:
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(FILENAME)) Then fso.DeleteFile(FILENAME)
Thankxs. It works.
Retrieving data ...