• 2021/3/16


    1.今日收获内容
    将写的内容放入表格中

     private void exportExcel(Context context) {
    
            String path = getExternalFilesDir("test3").getPath();
            File file = new File(path);
            if (!file.exists()) {
                file.mkdirs();
            }
            File files = new File(file.getPath()+"/"+"text3.xls");
            if (!files.exists()) {// 文件存在返回false
                try {
                    files.createNewFile();//创建文件
    
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            Toast.makeText(MainActivity.this, "存储到"+files.getPath(), Toast.LENGTH_SHORT).show();
            initExcel(files);
        }//创建表格
    

     建立表格。

    private void openDir() {

    File file = new File(filePath);
    Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
    intent.setType("/test3");
    intent.addCategory(Intent.CATEGORY_OPENABLE);
    intent.setDataAndType(Uri.fromFile(file), "files/test3/text3.xls");
    try {
    startActivity(intent);
    } catch (Exception e) {
    Toast.makeText(this, "没有正确打开文件管理器", Toast.LENGTH_SHORT).show();
    }
    }

    设定位置


    2.遇到的问题
    开始找不到

    3.明天目标

    表格设计

  • 相关阅读:
    3.node.js AssertionError: false == true错误解决
    9.获取当前时区时间和utc时间的工具方法
    2.Express封装mysq方法
    1.Express初识
    poj 3617
    前缀和
    pop 反序列化
    Reverse前两个题
    前两个Web题
    Misc
  • 原文地址:https://www.cnblogs.com/qiangini/p/14905814.html
Copyright © 2020-2023  润新知