Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Aug 19 '09 at 15:17

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

1  
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
add comment

3 Answers

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
add comment

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

Check out http://www.tmssoftware.com/site/flexcelnet.asp 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
add comment

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
add comment

Your Answer

 
discard

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.