up vote 1 down vote favorite
share [g+] share [fb]

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 :(

link|improve this question

0% accept rate
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
feedback

migrated from stackoverflow.com Aug 19 '09 at 15:17

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

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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