Sorting a csv

J

Jeff

Hi,

I have a csv that has around 250,000 rows. I have an excel macro that reads
data from the csv, but it expects the csv to be sorted. So I want to sort
the csv file using excel, (I could sort in access and export but this would
not be automated) I want the process automated.

Since the csv is 250,000 rows I cannot open it in excel and sort, because I
have excel 2003 it has a maximum row of 65,000. Does anyone know how to do
this, I tried looking online but could find nothing.

Thanks
 
B

Bill Sharpe

Jeff said:
Hi,

I have a csv that has around 250,000 rows. I have an excel macro that reads
data from the csv, but it expects the csv to be sorted. So I want to sort
the csv file using excel, (I could sort in access and export but this would
not be automated) I want the process automated.

Since the csv is 250,000 rows I cannot open it in excel and sort, because I
have excel 2003 it has a maximum row of 65,000. Does anyone know how to do
this, I tried looking online but could find nothing.

Thanks
You may be able to sort a csv file using the "sort" command prompt. Type
sort /? at a command prompt for help. Not sure if this will handle
250,000 rows.
Other choice is to upgrade to Excel 2007 or use Quattro Pro, which allow
1,000,000 rows.

Bill
 
P

Pete_UK

Microsoft has a macro here:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q120596

which enables you to import files with more than 65k rows - they get
put into separate sheets. You could then sort each sheet.

But, you would then need another macro to carry out a merge sort from
the 4 sheets and to produce your text file, as saving in csv format
from Excel will be limited to a single sheet.

Given that you will need macros to automate all this, wouldn't Access
be a better tool to use anyway? Try posting in one of the Access
groups.

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top