Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Not exactly a programming question but I have an excel file which has over a few thousand records and I would like to have it divided into smaller excel files of lets say a few hundred records. Whats the easiest way to do this - sorry for not being a direct programming question :(

share|improve this question

migrated from Aug 19 '09 at 15:17

This question came from our site for professional and enthusiast programmers.

A few thousand records is not pushing the limits of what a spreadsheet can hold. Do you have a specific reason for breaking it up? performance? ease of maintenance? – Chris Nava Aug 19 '09 at 18:44

If the spreadsheet is purely data (i.e. no cells referencing each other via formulas), then I guess I'd try to save it as a CSV, then programatically chop it up (e.g. by number of lines) and save each chunk to a different csv file.

share|improve this answer

Programmatically, there is nothing stopping you from opening the excel file and dividing it into several smaller files.

Check out for a third party tool to make this easier. You could do it completely on your own using SpreadSheetML, this just makes it easier.

share|improve this answer

If you have access to unix command line tools the CSV option mentioned earlier is trivial. Simple export to CSV, split --lines=100 the CSV into multiple files, import the files.

You could also try using macro scripting. Create a macro to cut the first few hundred records, paste them into a new spreadsheet and save with a unique name. Then press play multiple times or create a loop.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.