- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How can i replace Excel file with "yes" as shown below image using ilogc code.
Solved! Go to Solution.
How can i replace Excel file with "yes" as shown below image using ilogc code.
Solved! Go to Solution.
Can you please provide the ilogic code your are using to generate the excel message dialog? Are you overwriting an excel file?
Herewith attached code below.
'Save Excel files as current folder patch oPath = ThisDoc.Path oFolder = oPath If Not System.IO.Directory.Exists(oFolder) Then System.IO.Directory.CreateDirectory(oFolder) End If myXLS_File = oFolder & "\" & xlDocID & ".xls" xlWB.SaveAs(myXLS_File) = True GoExcel.DisplayAlerts = True myXLS_File.close
Can you post more of the code your using and explain the design intent of what your looking to achieve. Are you exporting a BOM or saving a new excel workbook? Go Excel has no Save as method so you might need to switch to Excel Application to to do the work.
Yes! i am export BOM with specific folder. But while Exporting again and again with same file name using automatically replace with YES using ilogic code
You can first check if the file exist then just delete the file before exporting the New BOM. This will eliminate the need to overwrite the file and prevent the dialog. Although in my testing the standard BOM export will automatically overwrite the file without the warning dialog. I suspect that the larger rule you are using has other issues with the workflow. Please share the entire rule if this is still an issue.
'Check if file exists, if it does then delete If System.IO.File.Exists(myXLS_File) Then System.IO.File.Delete(myXLS_File) End If