Hi,
I need help to create a batch file from the data captured in Excel.
I have created a macro (through recording macros - I'm not good with VB) that opens a text file containing printer details, cleans the data in the text file and uses certain formulas to produce data as below:
CALL SQ Printer1 \\Server1 >> C:\Printers.txt
CALL SQ Printer2 \\Server1 >> C:\Printers.txt
CALL SQ Printer1 \\Server2 >> C:\Printers.txt
I now need to save the info in my Excel spreadsheet as a batch file which on execution will give me printer IP address, location and driver details etc. Excel does allow me to save the file with a .bat extension but the data doesn't appear as it should and hence doesn't execute as it should.
Does anyone know of a way I can save the info from Excel as a batch file (using a macro - currently, I select all cells, copy them into notepad and save with a .bat extension and everything seems to work but it would be better if I could automate the whole process)?
Thanks in anticipation.
Regards,
Manny
I need help to create a batch file from the data captured in Excel.
I have created a macro (through recording macros - I'm not good with VB) that opens a text file containing printer details, cleans the data in the text file and uses certain formulas to produce data as below:
CALL SQ Printer1 \\Server1 >> C:\Printers.txt
CALL SQ Printer2 \\Server1 >> C:\Printers.txt
CALL SQ Printer1 \\Server2 >> C:\Printers.txt
I now need to save the info in my Excel spreadsheet as a batch file which on execution will give me printer IP address, location and driver details etc. Excel does allow me to save the file with a .bat extension but the data doesn't appear as it should and hence doesn't execute as it should.
Does anyone know of a way I can save the info from Excel as a batch file (using a macro - currently, I select all cells, copy them into notepad and save with a .bat extension and everything seems to work but it would be better if I could automate the whole process)?
Thanks in anticipation.
Regards,
Manny