J
Jeff Armstrong
Hello,
I have a macro that imports all the filenames from a
folder into column A. These files have the "." character
in their name. This is how the data comes to me and I
can't change it. The problem with this is that I want to
open and save each file as a CSV file. When I do this it
doesn't include the extension. I am assuming that this is
because it doesn't like the ".". The problem with this is
that later in the macro when I go back to open up the CSV
file I get the message notifying me that this file may
contain viruses and do I want to open this file? It also
puts all the data into column A rather than separate it by
the comma delimiter. I can manually add the extension to
the files by renaming each file and this fixes the problem
but there are 304 files and this data gets refreshed
weekly. Is there a way that I can automatically add the
extenstion to the end of the file when I save the each
file after importing and opening? Below is the current
statement that I use.
ActiveWorkbook.SaveAs Filename:="C:\Excel_Data\" _
& FileName, FileFormat:=xlCSVMSDOS
I have a macro that imports all the filenames from a
folder into column A. These files have the "." character
in their name. This is how the data comes to me and I
can't change it. The problem with this is that I want to
open and save each file as a CSV file. When I do this it
doesn't include the extension. I am assuming that this is
because it doesn't like the ".". The problem with this is
that later in the macro when I go back to open up the CSV
file I get the message notifying me that this file may
contain viruses and do I want to open this file? It also
puts all the data into column A rather than separate it by
the comma delimiter. I can manually add the extension to
the files by renaming each file and this fixes the problem
but there are 304 files and this data gets refreshed
weekly. Is there a way that I can automatically add the
extenstion to the end of the file when I save the each
file after importing and opening? Below is the current
statement that I use.
ActiveWorkbook.SaveAs Filename:="C:\Excel_Data\" _
& FileName, FileFormat:=xlCSVMSDOS