Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: split large CSV file >9.1MB into files of equal size that can be opened in excel

by dasgar (Priest)
on Sep 29, 2016 at 01:11 UTC ( [id://1172882]=note: print w/replies, xml ) Need Help??


in reply to split large CSV file >9.1MB into files of equal size that can be opened in excel

Just thought that I'd point out a few other aspects that you might want to consider.

Although it looks like you're wanting to reduce the CSV file by limiting the number of lines in each new CSV file (which will become rows in Excel), I thought that I'd point out that Excel has a max number of both columns and rows that it can handle. The max number of columns and rows supported will vary across versions of Excel. The reason for bring up this point is that if your original CSV file has more columns than what is supported by Excel, all of the split CSV files that you create from the original will have the same issue when trying to open in Excel.

Also, does the first line of the CSV file contain the column headers? If so, you'll want to capture that first line and reproduce it as the first line in all of your new CSV files. Otherwise, only the first new file will have the headers.

  • Comment on Re: split large CSV file >9.1MB into files of equal size that can be opened in excel

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1172882]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 06:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found