ok getting somewhere slowly......how do i loop through within a selected directory to look at all files within a directory?
[HTML]Sub WriteCSV()
Const Delimiter = ";"
Const Delimiter2 = "#"
Const Delimiter3 = " "
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const MyPath = "C:\Users\xxxx\ Desktop\" 'Put you path of where you want it saved here
...
User Profile
Collapse
-
Reformatting Excel Files and sending output to notepad
Hi All
Been attempting my spreadsheet conversion to notepad all morning without any luck and now very frustrated
Could some of you good people in here help out if possible
It seems very simple but I cant get my head round it. I have 56 large files in a directory which I need to reformat etc into a csv/notepad format. All 56 files that are in excel format need to be in this one humongous csv file
... -
Yeah I tried this by selecting all the cells in the column - but the output remained the same - only numbers (equivalent to the date) as Kad mentions.
I guess the best solution is to leave the numbers rather than dates and convert when I open the file up
Thanks for your help on this...Leave a comment:
-
The code works to a certain extent. The format starts off as dd/mm/yy hh:mm:ss but again at cell A1156 it reverts back to using the American format i.e. mm/dd/yy which seems a little strange. Is there some type of bug in Excel? or am I writing the code incorrectly?
My code at the moment looks like this:
...Code:Dim Obj1 As Object Dim Obj2 As Object Dim UserList() Sub RunMe() Dim Str1 As
Leave a comment:
-
Date Formats
Hi Guys
With the help of Kad I have managed to get my macro running so that it loops around all the files in the directory and formats it appropriately
However I have a problem with the date format. The input files have a date format of dd/mm/yy hh:mm:ss. Whereas the output file is mm/dd/yy hh:mm:ss. Also I have noticed that after (cell 1156) the format gets all mixed up for some reason and I dont really understand... -
Thanks HTH - I have attached the files below - yes I agree the code is shocking but I am fairly new to this so any help in cleaning would be good.
Thanks for your comments as well
Rich...Leave a comment:
-
Visual Basic - Looping through files
Hi All
I have created a macro which turns reports done by users into a format that is needed by me. The good this is that all the reports are in the same format.
However my question is around automating this process especially when there could be potentially hundreds of files by users that need converting.
Is there a way a routine could be run automatically which opened all the files on the drive that...
No activity results to display
Show More
Leave a comment: