Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have around 100 excel worksheets stored in csv format in one single folder.
I have to save each and every single csv worksheet to xls format which is a very cumbersome job. Pls provide me with some macro which automatically converts all csv files stored in folder to xls format. Ideally that macro should first ask me to point to location where all csv files are located and then it should convert all files to xls format. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try (you may have trouble with pre XL2003 versions) :
Sub test2() Dim myFolder As String, myFile As String With Application.FileDialog(msoFileDialogFolderPicker) .Show myFolder = .SelectedItems(1) End With myFile = Dir(myFolder & "\*.csv") Do While myFile < "" Workbooks.Open myfilder & myFile ActiveWorkbook.SaveAs myFolder & "\" & Left(myFile, Len(myFile) - 4) & ".xls", xlNormal ActiveWorkbook.Close myFile = Dir Loop End Sub -- Regards. Daniel "nc" a écrit dans le message de news: ... I have around 100 excel worksheets stored in csv format in one single folder. I have to save each and every single csv worksheet to xls format which is a very cumbersome job. Pls provide me with some macro which automatically converts all csv files stored in folder to xls format. Ideally that macro should first ask me to point to location where all csv files are located and then it should convert all files to xls format. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I batch convert 97-2003 .xls files to 2007 .xlsx files | Excel Discussion (Misc queries) | |||
Convert CVS files on Excel | Excel Discussion (Misc queries) | |||
Can I convert my Quatro Pro files to MS Excel files? | New Users to Excel | |||
How do I convert PDF files to Excel? | Excel Discussion (Misc queries) | |||
Convert prn files to excel? | Excel Discussion (Misc queries) |