表示不知“模板”长什么样,没办法定位。
批处理打印的话就是这样:- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in (要打印的.txt) do (
- if defined last (
- echo !last!&echo %%a
- set "last="
- )>prn else set last=%%a
- )
- ::两行两行打印文本
复制代码
复制代码 但不知通用性如何,vbs 的话则是:- path = "C:\Users\Administrator\Desktop\vbs\EXCEL例子.xls"
-
- Set exc = CreateObject("Excel.Application")
- exc.Visible = False
- exc.Workbooks.Open(path)
- exc.Worksheets(1).Activate
- exc.ActiveSheet.Printout
-
- exc.Quit
复制代码
|