Search code examples
c#export-to-excel

Formatting of data exported to excel file


I have exported data from a text file to an excel sheet, with the help of clipboard copy and paste. I used PIA for this.

The exporting is done properly and the data is exported to a single column i.e in the A Column. I want to fill my data in the rows of this column ,so that they are filled properly in the cell and I dont have to expand the A column to view complete data.

And also how can i change the font of the sheet while exporting


Solution

  • How is this text file created? If you have full control over its contents, I suggest using a csv ( comma-seperated-value ) file instead. You won't have control over the default font excel uses but it would fulfill your requirement of having the data populate multiple columns.

    Outside of using csv file to handle this data, I suggest you look into exporting it into an excel document directly, you would have full control over look and the font used for the contents.