运行前请确定主机上装有office,同时请将set "tab= "中的空格替换为实际的制表符- @echo off&setlocal enabledelayedexpansion
- set "tab= "
- (echo 度%tab%三角函数%tab%值%tab%度%tab%三角函数%tab%值%tab%度%tab%三角函数%tab%值%tab%度%tab%三角函数%tab%值
- for /l %%a in (0,1,360) do (
- for %%b in (正弦-sin 余弦-cos 正切-tan 余切) do (
- for /f "tokens=1,2 delims=-" %%c in ("%%b") do (
- if "%%d" neq "" (
- set "str=!str!%tab%%%a%tab%%%c%tab%=round^(%%d^(radians^(%%a^)^),4^)"
- ) else (
- set "str=!str!%tab%%%a%tab%%%c%tab%=round^(1/tan^(radians^(%%a^)^),4^)"
- )
- )
- )
- echo !str:~1!&set "str="
- ))>temp.xls
- start temp.xls
复制代码
|