excel - Keep leading zeros in specific column when running batch file that splits csv files into multiple files -


i have csv file on number of rows allowed in excel. i'm running batch file (listed) below split multiple csv files. code works , splits multiple files. however, there 2 fields (2 , 3rd) in file have leading zeros keep.

is there way can set 2 specific fields imported text keep leading zeros?

@echo off setlocal enabledelayedexpansion set bfn=test.csv set lpf=1048576 set sfn=test_split  rem not change beyond line. set sfx=%bfn:~-3% set /a linenum=0 set /a filenum=1 /f "delims=" %%l in (%bfn%) (     set /a linenum+=1     echo %%l >> %sfn%!filenum!.%sfx%     if !linenum! equ !lpf! (         set /a linenum=0         set /a filenum+=1     ) ) endlocal pause 


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -