Hello,
I am a complete novice to excel macros, and I would appreciate some help with a simple problem.
An instrument in our lab saves its data as CSV files. These are openable in MS Excel, but not other programs we use for data analysis (such as Matlab or Origin). If I open the file in excel, then save it (still as a csv) (though excel seems to default to unicode text when you go to resave it) it magically becomes readable by our other programs. I would like write a macro to open all files and resave them as CSV. All my data files have the format 1letters#.csv. So I can tell if the files have been resaved, I would like to save the new files as "A*.csv". So the original file might be 1abcA1.csv. After it has been resaved, it should be A1abcA1.csv.
I found a thread here: http://www.excelforum.com/excel-gene...rnal-data.html
which looks like it should be relevant. But, I think the loop is using the extension as the condition- since I am saving the file under the same extension, I think maybe it will cause an endless loop. However, I don't get that far. The modified code won't even compile.
When I record a macro to open and resave a single file, it looks very different from the sample code given in the previous thread. This is what I get:![]()
Please Login or Register to view this content.
I'm not sure what the difference is between OpenText and QueryTables.Add. I'm using excel 2007. The code in the thread above was for 2003. Is that the difference?![]()
Please Login or Register to view this content.
Thanks for your help.
ssbbg
Bookmarks