Hacktastic
Technical User
Hi Everybody,
I have a code that converts a CSV to a XLS within outlook. This is needed because it runs in conjunction with a rule i set up.
Everything works fine, however when i try to open the file, it refuses to open and I have to CNTL+ALT+DEL my way out of Excel just to open the file.
Something is getting stuck somewhere. Any Ideas?
I have a code that converts a CSV to a XLS within outlook. This is needed because it runs in conjunction with a rule i set up.
Everything works fine, however when i try to open the file, it refuses to open and I have to CNTL+ALT+DEL my way out of Excel just to open the file.
Something is getting stuck somewhere. Any Ideas?
Code:
Sub concsvxls()
Dim myolapp As Excel.Application
''Delete File
Dim File As String
File = "Z:\test\reportEXL.xls"
KillProperly (File)
''Create new File for SSIS Package
Workbooks.OpenText FileName:="Z:\test\report.csv", Origin:=xlWindows, _
StartRow:=7, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1)), _
TrailingMinusNumbers:=True
ActiveWorkbook.SaveAs FileName:="Z:\google\reportEXL.xls", FileFormat:= _
xlExcel8, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
Set myolapp = Nothing
End Sub