如题!~ 
我没辙了!~ 
要那种,打开权限加密,不是修改权限!~ 
jxl 和 poi 都无所谓了,效果出来就行!~ 

解决方案 »

  1.   

    1) 去这里下一个jexcel(有native调用,感觉不是很爽,而且要钱的!) 
    http://www.teamdev.com/jexcel/downloads.jsf JExcel v1.2 
      - JExcel library 
      - JExcel Demo (with source code) 
      - Programmer's Guide 
      - Bundled with JNIWrapper and ComfyJ 
      - Samples Download * 2.03 MB 2) http://www.teamdev.com/jexcel/index.jsf 
    evaluation license key. 
    申请一个试用的key,之后你的邮箱会收到说明 Dear bootupnow,Thanks for your interest in JExcel library.Attached you will find the evaluation key to unlock a full-featured version of JExcel for a period of 30 days starting from today [Wed Jul 16 10:09:10 CDT 2008].Please rename the attached file "license._zip" into "license.zip".
    For installation instructions, please see the "readme.txt" file inside the JExcel download package.Your successful evaluation is important to us. Feel free to contact us if you have any questions about the product.
    For technical questions, please e-mail to [email protected] or visit our support forum.
    For general questions, please e-mail to [email protected] or visit our support forum.
    We hope you will enjoy using JExcel!
    Sincerely,
    TeamDev Ltd.
    http://www.teamdev.com+1 425 223-3079 (US)
    +380 57 766-0163 (UA)
    Monday to Friday, 11 a.m.–7 p.m. (GMT+2).
        license.zip
    2K   Download   3) 按照Readme.txt的说明配置。 The  JExcel package  downloadable  from  JNIWrappper  Download  page  contains
    following:
     - JNIWrapper Native Library (jniwrap.dll)
     - JNIWrapper Library (jniwrap.jar)
     - ComfyJ Library (comfyj.jar)
     - WinPack Library (winpack.jar)
     - Programmer's Guides for JNIWrapper, ComfyJ and JExcel products
     - JExcel usage examples source code
     - JExcel Demo application and its source code
     - JExcel License file (License.txt)
     - This Readme file   Installing Library JAR Files
       ----------------------------
    JExcel uses JNIWrapper, ComfyJ and WinPack  products,  so  all  these  JAR  files 
    should be in the application class path. Native JNIWrapper library (jniwrap.dll) is required  for  JExcel  and  it  should 
    be placed in the working directory of a Java application.All license files should be placed along with native JNIWrapper library or in the
    application's JAR file, in its META-INF folder.4) 按照jexcel的JExcel Programmer's Guide就可以开始操作excel了import java.io.File;
    import java.io.IOException;import com.jniwrapper.win32.jexcel.Application;
    import com.jniwrapper.win32.jexcel.ExcelException;
    import com.jniwrapper.win32.jexcel.FileFormat;
    import com.jniwrapper.win32.jexcel.Workbook;
     
    public class Test {
        public static void doSomething(){
            try {
                Application application = new Application();
                application.setVisible(true);
                Workbook workbook = application.createWorkbook("title");
                workbook.setPassword("123"); // 需要密码是123才能打开excel文件。
                workbook.saveAs(new File("C:/test.xls"),FileFormat.WORKBOOKNORMAL, true);
                workbook.close(true);
            } catch (ExcelException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }         
        }
        
        public static void main(String[] args) {        
            doSomething();
        }

      

  2.   

    这个我试了,但报license错误,当把JExcel v1.2 文件和license下载下来以后,具体要怎么用呢,这个也一直在困扰我,楼上帮忙解释一下,谢谢
      

  3.   


    点击下载,压缩包中的工程可导入eclipse中,然后引入jxl.jar后运行
      

  4.   

    不是你想的那种不会用,你可以试一下,我用了几个版本的jxl.jar发现里面根本没有Application类,而只有通过你最开始的途径,拿到的JExcel v1.4 才有Application,以及上面程序运行需要的其他类。
    我下下来以后,解压以后,那他lib下的jar包直接用了,运行上面的代码,但报license错 
      

  5.   

    图有点小,这是报的错
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.jniwrapper.win32.jexcel.Application.<clinit>(Unknown Source)
    at Textjxl.TestJxl.doSomething(TestJxl.java:16)
    at Textjxl.TestJxl.main(TestJxl.java:30)
    Caused by: java.lang.RuntimeException: JNIWrapper license check failed: No valid license found.