Hi All,
I am using the code of Aspose in RFT(using Java) related to Excel file but is give error ,
So Please help me how will be use this code in RFT(Java).
Thanks in advance
This message was posted using Page2Forum from Hiding/Unhiding Rows and Columns - Aspose.Cells for Java
Hi,
Thanks for your posting and considering Aspose.Cells for Java.
I tried the following code using the latest version:
Aspose.Cells
for Java v7.0.4.7
and it is working fine.
I have attached the source and the output xlsx file.
Java
String filePath=“F:\Shak-Data-RW\Downloads\book1.xlsx”;
//Instantiating a Workbook object
Workbook workbook =
new Workbook(filePath);
//Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.getWorksheets().get(0);
Cells cells = worksheet.getCells();
//Hiding the 3rd row of the worksheet
cells.hideRow(2);
//Hiding the 2nd column of the worksheet
cells.hideColumn(1);
//Saving the modified Excel file in default (that is Excel 2003) format
workbook.save(filePath + “.
out.xlsx”);