lundi 11 mai 2015

Get Bytes by number of lines in Excel file

Dim FileMemCnt As Integer = File.ReadAllBytes(filePath).Length

Hi all,

I'm trying to figure out a way of determining the bytesize of say 1000 rows in a CSV file which may have say 10-20K rows. Once I get the bytesize chunk, I can then split the file into smaller files per exactly 1000 rows. Does anyone know a method that can enable me to therefore get the exact bytesize chunk I need?

Above I have posted a small snippet of code I use that can read the full size of bytes per file, so is there any way similar to read number of bytes per 1000 records?

Aucun commentaire:

Enregistrer un commentaire