hi
we are trying to read xlsx file which is generated using aspose.
please find the attached file and image which shows error and also find source code file.
Tanks & regards
Ranjith
Hi,
I can find “IndexOutOfBoundsException” while opening the file by Aspose.Cells for Java in a desktop/console application, I used the following sample code:
Workbook writeWorkbook = new Workbook();
String filePath=“file_opening_issue\aspose_poi_2.xlsx”;
FileInputStream fstream = new FileInputStream(filePath);
writeWorkbook.getOpenOptions().setEncoding(“UTF-8”);
writeWorkbook.open(fstream,FileFormatType.XLSX);
Also, when I tried to open your template file by MS Excel manually, it
shows errors and does repair work to open the file finally. We need to investigate the issue. By the way, could you tell us how did you create such a file, sample code segment (by Aspose.Cells for Java) would be fine in this regard. Anyways, I have logged an issue with an id: CELLSJAVA-26444.
Also, by the way, could you try our latest version v2.5.2.15 to generate your file if it works fine.
Thank you.
hi Amjad Sahi
to generate large excel file
we are using the following technique
For example, if you need to populate an Excel sheet with the results
from csv file(e.g. 200000 rows), then we could use the
following algorithm to send this Excel file to a browser:
1) create Excel template file (without the data-rows), save to disk
2) open ZipFile, iterate over all file-entries
3) open new ZipOutputStream(servletRequest.getOutputStream())
4) copy all ZipEntries to ZipOutputStream except:
5) when the ZipEntry is for ‘xl/worksheets/sheet1.xml’, then create new XMLStreamWriter(zipOutputStream)
5a) Write Excel sheet header to XML stream
5b) for each row in the csv file, populate XML row
5c) write Excel sheet footer to XML stream
6) close xml stream, continue with copying the other ZIP entries
we noticed some change in generating excel as compared to previous.
after generating excel we read this file using aspose.
to generate pivot and to do other things.
please find the attached input file and source code.
Thanks & Regards
Ranjith.
Hi,
Thanks for the template file with sample code segments.
We are already working on your issue. Once we have any update, we will let you know.
Thank you.
Hi,
hi
when we generate excel file from template using aspose we did not get any errors and we can read the excel file using aspose.
if it is generated using the code which is mentioned in jsp file.
when we are trying to read excel using aspose it will gives error.
Thanks & Regards
Ranjith
ranjthkumar.gendhe:
hi
when we generate excel file from template using aspose we did not get any errors and we can read the excel file using aspose.
if it is generated using the code which is mentioned in jsp file.
when we are trying to read excel using aspose it will gives error.
Thanks & Regards
Ranjith
hi
the attached csv file is input for jsp1.jsp and EiSRSGenerateExcelJsp.jsp to generate xlsx.
1.in jsp1.jsp file
we are using the following technique
For example, if we need to populate an Excel sheet with the results
from a csv (e.g. 200000 rows), then we could use the
following algorithm
1) create Excel template file (without the data-rows) with aspose api, save to disk
2) open ZipFile, iterate over all file-entries
3) open new ZipOutputStream(servletRequest.getOutputStream())
4) copy all ZipEntries to ZipOutputStream except:
5) when the ZipEntry is for ‘xl/worksheets/sheet1.xml’, then create new XMLStreamWriter(zipOutputStream)
5a) Write Excel sheet header to XML stream
5b) for each row in the csv, populate XML row (using poi cellReference() class)
5c) write Excel sheet footer to XML stream
6) close xml stream, continue with copying the other ZIP entries
after saving the excel to disk
we are trying to open this with aspose api.
at that time we get error.“IndexOutOfBoundException”.
2.in EiSRSGenerateExcelJsp1.jsp
we are using aspose api.
in this case the file will open by aspose.
xlsx file generated by xml (to know this rename ths xlsx to .zip and open it u will find the xml files)
in both cases jsp1.jsp and EiSRSGenerateExcelJsp.jsp having same xml files.
please find the attached files
Hi,
Hi,
It is very complicated to gather data relations and save them into resultant xlsx file directly.
And in your generated xlsx file, obviously there are many inconsistent records, such as the style index used by cells and the corresponding style records. We have encapsulated those complicate operations for users by LightCellsDataProvider APIs and recommend you to use it instead to save data directly to the resultant xlsx file.
If you get any difficulty or issue for using it, please send us your code and we will try to help you for that.
hi
how u noticed that the generated xlsx file has inconsistent records.
if we are generate excel using LightCellDataProvider API containing 10,48,576 rows and 25 col it takes 30-40 min.
if we generate excel using jsp1.jsp file having same number of cols and rows it takes 10-20min.
1.in this jsp1.jsp file
we generate a xlsx file by using aspose.
writing data by using streams.
after we are trying to read xlsx file by aspose.
why aspose fail to read generated excel.
Thanks & Regards
Ranjith
Hi,
For your given xlsx file, MS Excel gives some error messages too when opening into it. That is because there are invalid records in the sheet and style files. We do not know how do you use LightCellsDataProvider API to handle data and styles for the resultant xlsx file, so we cannot determine whether the performance issue is caused by your code or LightCellsDataProvider API. If you can provide us your code of using LightCellsDataProvider, maybe we can look into it to see whether some optimization can be made.
Thank you.
The issues you have found earlier (filed as 26444) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
hi
we are using Light Cell API.
we fail to create xlsx from csv having 10,00,000 and 100 cols
.
we need your help to do some optimization on code.
run this jsp in oc4j server on Oracle Applications
please find the attached files
i attached one sample csv file and code.
create one csv having 10,00,000 rows and 100 cols
perform some optimization on code.
give us some optimized solution for this.
how to apply formatting to cols which are generated by LightCell API
Tanks & Regards
Ranjith.