The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
split files into specified number of output files Migrainegirl UNIX for Dummies Questions & Answers 4 05-13-2008 09:38 AM
Split a file with no pattern -- Split, Csplit, Awk madhunk UNIX for Dummies Questions & Answers 10 12-17-2007 12:57 PM
Split A File Into 2 Files dummy_needhelp Shell Programming and Scripting 7 11-04-2007 07:36 PM
Help please!Split files according to index onthetopo Shell Programming and Scripting 9 05-11-2007 09:37 AM
awk command to split in to 2 files m_subra_mani Shell Programming and Scripting 3 12-13-2005 05:13 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-29-2007
savitha savitha is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 8
Split files using Csplit

I have an excel file with more than 65K records... Since excel does not take more than 65K records i wan to split the file and send it as two excel files... Could some help me how to use the csplit by specifiying the no of records
  #2 (permalink)  
Old 11-29-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
What format is the file in?
  #3 (permalink)  
Old 11-29-2007
savitha savitha is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 8
it saved with .xls as the extension
Basically i want to know howwe can split the file at every 65K records.. or just say if i have a file with 40 records i want to make it into 4 files with 10 records each
  #4 (permalink)  
Old 11-29-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Is it in XLS format though?

How did you create the file if it exceeds Excel limits?
  #5 (permalink)  
Old 11-29-2007
savitha savitha is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 8
it gets created from a stored proc .. gets saved in unix directory .xls.. which needs to ftp to winndows server

If you can just help me how to split a file irrespective of format... I think i can manage
  #6 (permalink)  
Old 11-29-2007
denn denn is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 96
This link shows how to split/recombine any file, into whatever size you want:
fsplit -- splitting up a binary file

However, an excel file would need to be recombined to work correctly, as its formatted in such a way, i.e, a binary file.you can't just cut it up and use the pieces.
I've used this to split >2G binary files, to put on fileservers that are not largefile aware, then they get copied to thier destination, recombined, and
everything works just fine.

The real fix for your delima will be in changing the program thats creating your "to large" excel file, to having a limit of ( 64k - some safety factor ), and putting the remainder into another file. Programs/scripts that create any sort of data, files, etc really need to be aware of the limitation of whatever will be using output it creates.
  #7 (permalink)  
Old 11-29-2007
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
Quote:
Originally Posted by savitha View Post
it gets created from a stored proc .. gets saved in unix directory .xls.. which needs to ftp to winndows server

If you can just help me how to split a file irrespective of format... I think i can manage
I bet (but I might be wrong) your 'stored proc' creates a file in CSV format and names it with the '.xls' extention. Just do a more/less on the file to see what's inside first.
If it's a real Excel xls binary file... splitting it into smaller piece might an issue. As denn has suggested above a really solution would be make your 'stored proc' largefile 'aware' creating smaller files.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0