Hi,
I am using Aspose cells 7.1.1 for java. When i am reading a cell value whose row is empty i am getting the value of the previous row, last column which has a value.
Previously i was using Aspose cells 2.4.2.4 for java in which i didn't encounter this problem.
I have attached the excel and the java file (Java file extension is replaced by .txt) which i have used.
I am using java version 1.6
Please help me in solving this issue.
Hi,
Thank you for using Aspose.Cells for Java.
I have checked your input file with your source code and it is working fine. The row indexes start from 0, so looking at your excel file, get(23,0) and get(24,0) will return “XXXXXXXX” while the remaining two statements will return empty.
Please download and use this latest version: Aspose.Cells for Java v7.3.0, and let us know your feedback.
My output:
tmpValue:XXXXXXXX
tmpValue:XXXXXXXX
tmpValue:
tmpValue:
Code that I have used:
Workbook excelWb = new Workbook("K://CU0118258038201a-1_1.xls");
Worksheet sheet = excelWb.getWorksheets().get(excelWb.getWorksheets().getActiveSheetIndex());
Cells cells = sheet.getCells();
String tmpValue = (String) cells.get(23,0).getStringValue();
System.out.println("tmpValue:"+tmpValue);
tmpValue = (String) cells.get(24, 0).getStringValue();
System.out.println("tmpValue:"+tmpValue);
tmpValue = (String) cells.get(25, 0).getStringValue();
System.out.println("tmpValue:"+tmpValue);
tmpValue = (String) cells.get(26, 0).getStringValue();
System.out.println("tmpValue:"+tmpValue);
I have also attached here a screenshot for your reference that shows the row numbering based on 0 index.
Hi Iqbal,
I tried using the latest jar, which has solved this issue.
But my itention to upgrade the jar from 2.4.2.4 to 7.1.1 was a alignment issue which has not solved the problem
i am writing a standalone program to replicate the alignment issue using the latest jar.
Can you please help me in providing a patch for the 7.1.1 in addressing the cell issue.
With Regards,
Nagaraj.A
Hi,
Thanks for using Aspose.Cells for Java.
Please use the latest jar for your sample, which you can download from this link:
Aspose.Cells
for Java v7.3.0.3
You might also need other jars which you can find from the major release link:
Aspose.Cells for Java 7.3.0
The name of these prerequisite jars are
- bcprov-jdk16-146.jar
- dom4j-1.6.1.jar
- stax2-api-3.0.2.jar
- woodstox-core-asl-4.1.1.jar
Hi,
I tried using the jar u have mentioned, but still the alignment issue.
I have attached a sample java program, the excel which is used and the output PDF which was generated.
Also mentioned in the word document the error which i have encountered.
When i used 7.1.1 the error didn't occur.
Please help me in resolving the same.
With Regards,
Nagaraj.A
Hi,
Thanks for your posting and using Aspose.Cells for Java.
I was able to notice this issue using the latest version:
Aspose.Cells for Java 7.3.1
We have logged this issue in our database. We will look into it and fix this issue. Once the issue is fixed or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40299.
Below is my test code. I have attached the output pdf for your reference.
Java
String filePath = “F:\Shak-Data-RW\Downloads\test\sssss.xls”;
Workbook workbook =
new Workbook(filePath);
workbook.save(filePath + “.
out.java.pdf”);
Hi,
Thanks for using Aspose.Cells.
This is to inform you that we have fixed your issue CELLSJAVA-40299 now. We will soon provide the fix after performing QA and including other enhancements and fixes.
Hi,
Thanks for using Aspose.Cells.