ASKER
ASKER
Usage: C:\Perl64\eg\alma\personale\test\xls2csv.pl filename sheet-colrow:colrow
[-rotate]
eg: C:\Perl64\eg\alma\personale\test\xls2csv.pl filename.xls 1-A1:B12
C:\Perl64\eg\alma\personale\test\xls2csv.pl filename.xls A1:M1 -rotate
Const cExcelCSV = 6
strDir = "C:\Temp\Files"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.DisplayAlerts = False
For Each objFile In objFSO.GetFolder(strDir).Files
strExt = objFSO.GetExtensionName(objFile.Path)
If LCase(Left(strExt, 3)) = "xls" Then
Set objWorkbook = objExcel.Workbooks.Open(objFile.Path, False, True)
objWorkbook.SaveAs Replace(strPath, "." & strExt, ".csv"), cExcelCSV
objWorkbook.Close False
Set objWorkbook = Nothing
End If
Next
objExcel.Quit
Set objExcel = Nothing
Set objFSO = Nothing
ASKER
ASKER
ASKER
Const cExcelCSV = 6
strDir = "B:\EE\EE29066306\Files"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.DisplayAlerts = False
For Each objFile In objFSO.GetFolder(strDir).Files
strExt = objFSO.GetExtensionName(objFile.Path)
If LCase(Left(strExt, 3)) = "xls" Then
Wscript.Echo "Reading file: [" & objFile.Path & "]"
Set objWorkbook = objExcel.Workbooks.Open(objFile.Path, False, True)
strPath = Replace(objFile.Path, "." & strExt, ".csv")
Wscript.Echo "Writing file: [" & strPath & "]"
objWorkbook.SaveAs strPath, cExcelCSV
objWorkbook.Close False
Set objWorkbook = Nothing
End If
Next
objExcel.Quit
Set objExcel = Nothing
Set objFSO = Nothing
ASKER
ASKER
ASKER
Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.
TRUSTED BY
»bp