excel api
hi
i m using POI api for read the excel files to java..
when i m trying to read the excel files with large amount of data, which
have macros or freeze option it throws outofmemory error.
for outofmemory error i increased the heapsize memory..but no use....
here i gave the url below....i want any other api which is not in that below url....
http://schmidt.devlib.org/java/libraries-excel.html
Hi, though it's in the list you cited. This resource successfully worked for me. I
have been experiencing a bug with POI that I switch to Java Excel by Andy
Khan.
http://www.andykhan.com/jexcelapi/
thanks .for ur suggestion...
but the Java Excel API can read the excel file upto 2000 only (I think so)..
is it possible it can read newer versions
> thanks .for ur suggestion...
>
you're welcome
> but the Java Excel API can read the excel file upto
> 2000 only (I think so)..
>
Yes you're right.
>
> is it possible it can read newer versions
I'll check -
> when i m trying to read the excel files with large
> amount of data, which
> have macros or freeze option it throws outofmemory
> error.
>
> for outofmemory error i increased the heapsize
> memory..but no use....
>
> here i gave the url below....i want any other api
> which is not in that below url....
So using another API magically reduces 400 MB of Excel data to 20 MB? Wow.
Maybe you should rather re-think your working approach.
thanks for ur answers..please try whether it can read newer versions
thanks once again
hi lem i used the javaexcel API....
but i got outofmemory from this api also...
how can i avoid this error without increase heap size memory ?
can u tell me the solution
thanks
> hi lem i used the javaexcel API....
>
> but i got outofmemory from this api also...
>
> how can i avoid this error without increase heap size
> memory ?
>
> can u tell me the solution
>
hi. Maybe your excel file size necessitates a larger heap memory. If your file is really large then your JVM also needs a large memory.
how big is your excel file?
Hi my excel file size is 6 MB...
If i increase heap size memory,,then the cpu takes hundread of usage...so the application goes to hang...
> Hi my excel file size is 6 MB...
>
That's weird. I'm working with as large as 11mb, and have increased my
maximum heap memory size to 192mb, and it works
> If i increase heap size memory,,then the cpu takes
hundread of usage...so the application goes to hang...
Sorry, but I did'nt get this part. Please enlighten me. :)
The task manager tells the cpu usage...in taskmanager->performance tab-> The graph says 100 percent cpu usage....
The task manager tells the cpu usage...in taskmanager->performance tab-> The graph says 100 percent cpu usage....we can check this performance when import excel file to java application........
thanks
I switched from POI to JExcel too, and I don't regret it, but I've found it to be a couple of orders of magnitude slower.
I suggest you turn the JExcel garbage collection *off*. For some reason by default it calls System.gc() itself all over the place, which is just a complete waste of time. The JVM has much more of an idea about when GC is required than any application. You can turn it off in JExcel with a system property, or via the WorkbookSettings object.
ejpa at 2007-7-29 11:43:20 >

oh I see - maybe it's the macros and the freeze option. let me check it's
documentation.
hi again. I've already checked. It's supposed to preserve macros on copy - but is
not able to generate macros.
Is your program also manipulating and modifying the macros?
no my program is cant read or write macros....
is your program very long?
can you post some of your relevant code here?
Please don't forget to enclose it with code tags. :)
will get back to you tomorrow :) i'm about to leave from work... check up on your code tomorrow
hi here the code
Workbook workbook = Workbook.getWorkbook(file);
Sheet sheet = workbook.getSheet(cmbSheets.getSelectedIndex());
The excel file will be in file...
The out of memory throws when the second line readches
thanks
hi lem
here my code..
Workbook workbook = Workbook.getWorkbook(file);
Sheet sheet = workbook.getSheet(0);
The Excel file will be in file reference..
The out of memory throws when the execution comes next line..
Tell me any remedy for this issue...
or
when we "save As" an excel in csv format.....i can reduce the memory...
so i need how to convert an excel file into .csv format by java code
(note:CSV format means ".csv" format not comma separeted values)
> (note:CSV format means ".csv" format not comma
> separeted values)
Uuuuhhmmm, ".csv" means Comma Separated Values, it's just that it does not need to be a comma that is used.
hi. good morning - what I did, which significantly reduced the file size, was
divide my "50,000+"-rows worksheet into several sheets - but I do not know if
that can be applied to solve your problem.
Hmmm... What was the maximum heap memory size you've set and tried?
hi lem very good morning
i m using netbeans 5.0 IDE..
-J-Xms32m -J-Xmx128m this is my heap size memory. in that...
but i dont want increase the heap size memory........
i have the second option...
that i want to convert the excel file into csv..
For example open an existing excel file..and using saveAs filename.csv format...
you will get a csv format file...
like that i want do this by java code...
can u please help me..
thanks for ur tech support...
> hi lem very good morning
Good morning.
> i m using netbeans 5.0 IDE..
Good for you.
> -J-Xms32m -J-Xmx128m this is my heap size memory. in
> that...
>
> but i dont want increase the heap size
> memory........
Good, I agree. So don't.
> i have the second option...
> that i want to convert the excel file into csv..
Is this somehow related to the first option?
See Apache POI/HSSF, JExcel, and several other Java Excel packages that you can find with a Google search.
ejpa at 2007-7-29 11:43:25 >

> hi lem very good morning
>
Hi.
> i have the second option...
> that i want to convert the excel file into csv..
> For example open an existing excel file..and using
> saveAs filename.csv format...
It seems like a viable option... if you're only interested in reading values
> you will get a csv format file...
> like that i want do this by java code...
>
> can u please help me..
have no prior experience regarding this, but maybe others, or Google can
help - :)
> thanks for ur tech support...
you're welcome. still have not been much of a help.