I suspect that if you imported a CSV with more than 1048576 records in it into 
Excel then it would produce a workbook with multiple sheets, spanning the data 
across those sheets - is this what you are seeing?


Your description of what you are trying to do isn't very clear though. Your 
only options if you are trying to output that workbook to CSV is to either 
produce a CSV file per sheet, or simply write out all the sheets to a single 
CSV file sequentially. Both are fairly trivial operations that can easily be 
done by combining POI with OpenCSV or another CSV library. You would have to be 
careful about how many columns you need to output to generate a "proper" CSV 
file, but if all your sheets have the same number of columns then you'll be 
fine.

If you are trying to limit memory use when reading the workbook then you would 
need to use one of the Event APIs in POI, either HSSF or XSSF, depending on 
whether the workbook is an XLS or XLSX file.


If I've misunderstood your requirement then try describing it another way and 
maybe we can better help you. 



>________________________________
> From: Sai Pavan Gadde <[email protected]>
>To: POI Users List <[email protected]> 
>Sent: Friday, March 28, 2014 10:12 AM
>Subject: Re: Excel WorkBook to CSV Conversion
> 
>
>Hi,
>But if we open csv file by using excel, we get as in form of sheets, that
>the way i required
>
>Kindly see this..
>
>
>On Fri, Mar 28, 2014 at 2:39 PM, Sergey Maslov <[email protected]>wrote:
>
>> Hi,
>> CSV is a plain file, it does not support multiple sheets.
>>
>> On Fri, Mar 28, 2014 at 10:13 AM, Sai Pavan Gadde <[email protected]
>> >wrote:
>>
>> > Hi Everyone,
>> >
>> > I got struck with the task like, I have an excel workbook that contains
>> > no.of excel sheets which is in the size more than 100MB. Now i would like
>> > to get a java coding for it without using an array-list parameter, rather
>> > should use a good parameter which should not consume memory.
>> >
>> >
>> > Also, In CSV file, i need the same sheets that obtain in xls file after
>> > conversion to csv. Recently i faced the problem like all excel sheets
>> > merging into single csv sheet file.
>> > ref:
>> >
>> >
>> http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
>> >
>> > I am glad and thankful in advance for getting a quick and good reply
>> > --
>> > *THANKS & REGARDS,*
>> > G.SAI PAVAN,
>> > CCDH4 CERTIFIED,
>> > Ph: 8121914494,
>> > *www.bigdatatrendz.com <http://www.bigdatatrendz.com>*
>> > linkedin profile <http://in.linkedin.com/pub/gadde-sai-pavan/38/44b/453/
>> >
>> > HYDERABAD.
>
>> >
>>
>
>
>
>-- 
>*THANKS & REGARDS,*
>G.SAI PAVAN,
>CCDH4 CERTIFIED,
>Ph: 8121914494,
>*www.bigdatatrendz.com <http://www.bigdatatrendz.com>*
>linkedin profile <http://in.linkedin.com/pub/gadde-sai-pavan/38/44b/453/>
>HYDERABAD.
>
>
>

Reply via email to