Dear all,
could you show me plz how to create a batch file can
export data from excel to text file and save this text file in (C:\) drive
plz i need your help
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
@echo off & setlocal
if exist exl.vbs goto :alrdydon
:: might need to change this line
set xls=c:\excel\mycalendar.xls
:: change the following to suit your preference
:: (ie: where you want the exported text to go)
set outp=c:\doc\test.txt
> exl.vbs echo Dim xl
>> exl.vbs echo Set xl = WScript.CreateObject(“Excel.Application”)
:: change to false if you want it running in stealth-mode
>> exl.vbs echo xl.application.Visible = TRUE
:: this disables the overwrite-safety dialogue
>> exl.vbs echo xl.application.displayalerts=false
>> exl.vbs echo set ac=xl.WorkBooks.open(“%xls%”)
>> exl.vbs echo ac.SaveAs “%outp%”,-4158
>> exl.vbs echo xl.application.quit
:alrdydon
wscript exl.vbs