How to set size of column of csv file?

后端 未结 3 1089
长情又很酷
长情又很酷 2021-01-11 13:53

I want to set the size of each column in csv file, I want to set the size of column against the field, I don\'t know where I can do the code of to set the size? Can anyone h

3条回答
  •  鱼传尺愫
    2021-01-11 14:28

    As I know, you cannot set a column size in CSV because there is absolutely no information about the presentation layout. CSV is Coma Separated Value.

    The best behaviour for you application that will open your file is to set the column width to fit the data.

    If you want to manage your presentation layout, you should instead generate a html content that could be opened with Excel (in example). In such a content, you will be able to set some attributes like width="400"...

提交回复
热议问题