Hide last authors
etvc developer 1.1 1 {{groovy}}
2 import com.xpn.xwiki.*;
3 import com.xpn.xwiki.api.*;
4 import com.xpn.xwiki.doc.*;
5 import org.apache.commons.io.FileUtils;
6 import java.io.File;
7 import java.net.URL;
8
Alexandru Colesnicov 4.5 9 att = doc.getAttachment("TestingData.xls")
Alexandru Colesnicov 4.16 10 println ("att variable got its value")
11 println ("att Class is " + att.getClass().getSimpleName() + " (" + att.getClass().getName() + ")")
Alexandru Colesnicov 4.12 12
Alexandru Colesnicov 4.13 13 xwa = att.getAttachment()
Alexandru Colesnicov 4.16 14 println ("xwa variable got its value")
15 println ("xwa Class is " + xwa.getClass().getSimpleName() + " (" + xwa.getClass().getName() + ")")
Alexandru Colesnicov 4.13 16
Alexandru Colesnicov 4.15 17 sfi = xwa.getAttachment_content().storageFile
Alexandru Colesnicov 4.16 18 println ("sfi variable got its value")
19 println ("sfi Class is " + sfi.getClass().getSimpleName() + " (" + sfi.getClass().getName() + ")")
Alexandru Colesnicov 4.15 20
etvc developer 1.1 21 {{/groovy}}