Sublime Forum

Delimited text file data in Sublime - how to export to Excel

#1

Good day, I am a new user to Sublime Text editor and impressed with its ability to open a very large text file (>1.1GB). My text file data is delimited with “|” and I can see the columns of data in Sublime.

There are over 4m rows of data and I would like to export this data into Excel, 1m rows at a time i.e. I would like to have 4 sheets of data in Excel.

Could you please assist me with this or advise on the way I can copy data from Sublime to Excel and specify the rows that I want to copy?

Many thanks!

Aveshen

0 Likes

#2

Try:

XlsxWriter

 



 

Also, I recently wrote some code to format & print results from CSV files.

You can probably change the delimiter to | so it will work with your file, and replace the code after for row in csvRows: with some functions from XlsxWriter.

0 Likes

#3

I would use Python as well, but only pandas.

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html

To read csv file.

Then

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_excel.html

To put it as an excel file

1 Like