I tested them both with Windows 8 and Office 2013:
The both created identical .csv files when testing with .xlsx files and in folders that have spaces and & in the pathname.
c:\Files\bat\Misc\Excel-XLS-to-CVS-conversion2.bat "d:\abc\123 & 456\Movie list app1.xlsx"Carlsomo's code needed to have these lines changed/added to handle long filenames and clean up the VBS file.
cscript /B
"%~dp0Excel2csv.vbs
" "%~1" "%Outfile%"
del "%~dp0Excel2csv.vbs"and this line - to handle a case where the batch file is called from a remote folder.
)>>"
%~dp0excel2csv.vbs"
They both have issues when the batch file name has spaces in it, variously in the current folder or called from a remote folder.
FWIW there was an odd artifact at the top of each .csv file - see below - one or more lines of just commas.
Code: Select all
,,,,,,,,,,
Year,Title,Critics Score,Audience Score,Cast,Director,Genre,MPAA rating,Format,Comments,ID
1994,Forrest Gump,70,93,"Tom Hanks, Robin Wright, Gary Sinise, Mykelti Williamson",Robert Zemeckis,"Drama, Romance, Comedy",PG-13,DVD,,10036
1946,It's a Wonderful Life,93,94,"James Stewart, Donna Reed, Lionel Barrymore, Thomas Mitchell",Frank Capra,"Drama, Kids & Family, Classics, Science Fiction & Fantasy",PG,VHS,Original B&W version,18062
1988,Big,96,73,"Tom Hanks, Elizabeth Perkins, John Heard, Jared Rushton",Penny Marshall,"Kids & Family, Science Fiction & Fantasy, Comedy",PG,DVD,,10396
1988,Rain Man,88,88,"Dustin Hoffman, Tom Cruise, Valeria Golino, Jerry Molen",Barry Levinson,Drama,R,DVD,,15245
1990,The Bonfire of the Vanities,23,27,"Tom Hanks, Bruce Willis, Melanie Griffith, Kim Cattrall",Brian DePalma,Comedy,R,Blu-ray,,14676
Code: Select all
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,NO.,YEAR,TITLE,Review, , , , , ,STARRING ACTORS,DIRECTOR,GENRE,RATING,FORMAT,COMMENTS,
,1,1994,Forrest Gump,5 Stars,5,5,5,5,5,"Tom Hanks, Robin Wright, Gary Sinise",Robert Zemeckis,Drama,PG-13,DVD,Based on the 1986 novel of the same name by Winston Groom,
,2,1946,It’s a Wonderful Life,2 Stars,2,2,2,2,2,"James Stewart, Donna Reed, Lionel Barrymore ",Frank Capra,Drama,G,VHS,Colorized version,
,3,1988,Big,4 Stars,4,4,4,4,4,"Tom Hanks, Elizabeth Perkins, Robert Loggia ",Penny Marshall,Comedy,PG,DVD,,
,4,1954,Rear Window,3 Stars,3,3,3,3,3,"James Stewart, Grace Kelly, Wendell Corey ",Alfred Hitchcock,Suspense,PG,Blu-ray,,