Created attachment 28249 [details] changeExternalReference.patch - Patch to implement this feature In our setup, we have a main XLS which references other (>10) XLS files. The original author of the main XLS referenced some dummy files to create the formulars in the main XLS. During our program execution, we generate the "real" XLS files with should be referenced by the main XLS. The formular itself shouldn't be changed. The attached patch introduces a new public method on HSSFWorkbook (As the OOXML is completly different and not in our scope I skipped it). This allows the caller to change the file reference while preserving the formular itself. As the file-notation is quite strange in the XLS lookup table I'm not 100% sure wether all kind of absolute/relative paths are interpreted corretly. I tested with * Relative paths * Absolute paths with windows drive letters * Absolute paths with windows UNC path (\\server\share) I have not signed any kind of NDA from Microsoft and used only the public availible file format information.
Created attachment 28250 [details] changeExternalReference.patch - Patch to implement this feature SVN diff patch
Please provide unit tests, both low-level for SupBookRecord and usermodel-level that involve calling HSSFWorkbook.changeExternalReference(). If the test requires input workbooks then attach them too. Regards, Yegor
Created attachment 28280 [details] ChangeExternalReferenceWithTest.patch Please find attached the patch applied against the latest SVN revision (trunk). It includes the feature and unit tests for the user model and the internal translation logic.
Thanks for the patch, applied in r1242701 Regards, Yegor