Hi,
This is the code snippet which i am using.I am using the evaluation version of Aspose 1.9 Java version.Please let me know.I am using the same code which u have sent.Attaching my code here
package com.source;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import com.aspose.cells.ProtectionType;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
public class TestAspose {
public static void main(String[] args) throws Exception {
Workbook book = new Workbook();
Worksheet s = book.getWorksheets().addSheet("Test");
s.getCells().getCell(1, 1).setValue("Cell Contents");
book.protectFile(ProtectionType.OPEN_FILE, "myPassword");
File f = new File("output.xls");
OutputStream out = new BufferedOutputStream(new FileOutputStream(f));
book.save(out);
out.flush();
out.close();
}
}
Please let me know what is the issue.
Thanks
Joe