locked
Split CSV FIle RRS feed

  • Question

  • User637234440 posted

    I have a csv file that contain about 1 Crore rows.

    I need to break this file into 10 csv files those all need to be contain around 10 lakh records.

    Thanks

    Saurabh

    Monday, October 3, 2011 1:53 AM

Answers

  • User269602965 posted

    You can use SYSTEM.IO FILE STREAMING

     to read each line  to the end of the line delimiter (most files it is Carriage Return Line Feed)

    and write out that line to a file,

    looping every 10 lakh records to start a new file.

    It is very fast in C# or VB.NET, even for 1 Crore rows.

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 3, 2011 3:15 PM