If you don't care about preserving blank lines, !, (, ), or ^, you can run the input file through a for loop, storing each line in a separate variable, then merging the variables with a newline character at the end of each one.
@echo off
setlocal enabledelayedexpansion
cls
set counter=0
for /f "delims=" %%A in (input.txt) do (
set line[!counter!]=%%A
set /a counter+=1
)
set /a counter-=2
set LF=^
for /L %%A in (1,1,!counter!) do set sheet=!sheet!!line[%%A]!!LF!
set /a counter+=1
for /L %%A in (!counter!,1,!counter!) do set sheet=!sheet!!line[%%A]!
echo !sheet!>input.txt
However, if you want to preserve blank lines and special characters, there are a few tricks you can throw in, but the overall idea is the same.
@echo off
setlocal enabledelayedexpansion
cls
:: findstr /n puts line numbers at the start of each line, which will allow us to preserve blank lines
for /f "tokens=1 delims=:" %%A in ('findstr /n "^" input.txt') do set line_counter=%%A
::set /p preserves special characters
<input.txt (
for /L %%A in (1,1,!line_counter!) do set /p line[%%A]=
)
set /a line_counter-=1
set LF=^
:: Do NOT delete the two blank lines above this line.
for /L %%A in (2,1,!line_counter!) do set sheet=!sheet!!line[%%A]!!LF!
set /a line_counter+=1
for /L %%A in (!line_counter!,1,!line_counter!) do set sheet=!sheet!!line[%%A]!
echo !sheet!>input.txt
!s anymore?