Is that possible of reading the .csv file in column wise and the column have different lengths ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sonnysonu
    New Member
    • Apr 2024
    • 1

    Is that possible of reading the .csv file in column wise and the column have different lengths ?

    This is the data of csv file
    1 2 3
    1 2 3
    1 2 3
    1 2 3
    2 3
    2 3
    3
    the lengths should be different i have to store the data by column-wise with in the specific length.
    suppose the i have to get the output like
    coloum 1 :

    1
    1
    1
    1
    until with in the specific length of only.
    What logic i have to use?
  • dev7060
    Recognized Expert Contributor
    • Mar 2017
    • 656

    #2
    Is that possible of reading the .csv file in column wise and the column have different lengths ?
    This is the data of csv file
    1 2 3
    1 2 3
    1 2 3
    1 2 3
    2 3
    2 3
    3
    the lengths should be different i have to store the data by column-wise with in the specific length.
    suppose the i have to get the output like
    coloum 1 :

    1
    1
    1
    1
    until with in the specific length of only.
    How certain is it the content of the file is present in the correct format? What language, C or C++?

    Read line by line.
    Use a variable to keep track of the column.
    Add number of spaces for index calculation.
    Do not process in case of end of line or end of file.

    Comment

    Working...