Hi,
I’ve been using ASPOSE for quite a while now and I’m very impressed, great product!
I do have a question. I’m trying to use the Protection class to protect a spreadsheet. I searched for examples and got my answer. My problem is this, when I try to use the constructor, per the examples, I get Protection class not visible error in Eclipse. I put together a small bare-bones program to test it in case I was doing something incorrect…
The sample program has the same issue. I think I’m using the latest cells jar, v17.02.0.jar.
Any thoughts?
Thanks,
Perry
==================================
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Futura}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Futura; min-height: 14.0px}
span.s1 {color: #931a68}
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import com.aspose.cells.Protection;
import com.aspose.cells.Workbook;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Futura; color: #931a68}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Futura; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Futura; color: #3933ff}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Futura; color: #4f76cb}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Futura; color: #777777}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Futura}
span.s1 {color: #000000}
span.s2 {color: #931a68}
span.s3 {color: #0326cc}
span.s4 {color: #91afcb}
span.s5 {color: #3933ff}
span.s6 {color: #7e504f}
span.s7 {text-decoration: underline ; color: #931a68}
span.s8 {text-decoration: underline}
span.Apple-tab-span {white-space:pre}
public class IFXL {
@SuppressWarnings("unused")
public static void main(String[] args) throws Exception
{
FileInputStream fstream = null;
Workbook workbook = null;
com.aspose.cells.License license = new com.aspose.cells.License();
license.setLicense("Aspose.Total.Java.lic");
fstream = new FileInputStream(args[2]);
workbook = new Workbook(fstream);
Protection p = new Protection(); // error: The constructor Protection() is not visible
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px '.SF NS Text'}return;
}
}