Hello,
I have an Excel file that contains many worksheets with a lot of formulas (accross sheets inside the workbook), but no link to other workbook. I want to enter some values in some cells and get a result appearing in a specific cell.
To do that, I create a writable copy of my file, and just try to save this copy. When I try to open the copy manually, I get an error saying: "The workbook you opened contains automatic links to information in another workbook".
The size of the copy is also not the same as the size of the source file (source=4,774 KB and copy=5.244 KB).
Here is my code:
import java.io.File;
import jxl.Workbook;
import jxl.write.WritableWorkbook;
public class ExcelFileProcess {
public static void main(String[] args) {
try{
String fileName = "MyTemplate2007.xls";
Workbook workbook = Workbook.getWorkbook(new File(fileName));
WritableWorkbook copy = Workbook.createWorkbook(new File("output.xls"), workbook);
//WritableSheet inputSheet = copy.getSheet("Inputs");
// write charging structure details
copy.write();
// Close the workbook
copy.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
Could you help please...
Thanks in advance,
Cathy