- ·上一篇:怎样在word中把页面分成多页
- ·下一篇:word段落底纹如何设置
在手机上如何把问卷星数据导出表格
1.在手机上怎么把问卷星数据导出表格
需求描述将应用内的数据导出为excel表格。
实现添加依赖包在app的build.gradle里面添加依赖包:implementation group: 'net.sourceforge.jexcelapi', name: 'jxl', version: '2.6.12'有很多读者提到该依赖有问题,笔者推测是网络代理的问题,遇到这种问题大家可以到下载对应的jar包手动导入即可:如果还是不能成功笔者已经写好了jar包放在了,大家可以自由下载,下载到jar包之后将其放在app/libs目录下,然后右键jar包文件,然后Add as Library即可。编写excel工具类package cn.xiaojii.cashgift.util.io;import jxl.Workbook;import jxl.WorkbookSettings;import jxl.format.Colour;import jxl.write.Label;import jxl.write.WritableCell;import jxl.write.WritableCellFormat;import jxl.write.WritableFont;import jxl.write.WritableSheet;import jxl.write.WritableWorkbook;import jxl.write.WriteException;/** * @author dmrfcoder * @date 2018/8/9 */public class ExcelUtil { private static WritableFont arial14font = null; private static WritableCellFormat arial14format = null; private static WritableFont arial10font = null; private static WritableCellFormat arial10format = null; private static WritableFont arial12font = null; private static WritableCellFormat arial12format = null; private final static String UTF8_ENCODING = "UTF-8"; /** * 单元格的格式设置 字体大小 颜色 对齐方式、背景颜色等。
*/ private static void format() { try { arial14font = new WritableFont(WritableFont.ARIAL, 14, WritableFont.BOLD); arial14font.setColour(jxl.format.Colour.LIGHT_BLUE); arial14format = new WritableCellFormat(arial14font); arial14format.setAlignment(jxl.format.Alignment.CENTRE); arial14format.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); arial14format.setBackground(jxl.format.Colour.VERY_LIGHT_YELLOW); arial10font = new WritableFont(WritableFont.ARIAL, 10, WritableFont.BOLD); arial10format = new WritableCellFormat(arial10font); arial10format.setAlignment(jxl.format.Alignment.CENTRE); arial10format.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); arial10format.setBackground(Colour.GRAY_25); arial12font = new WritableFont(WritableFont.ARIAL, 10); arial12format = new WritableCellFormat(arial12font); //对齐格式 arial10format.setAlignment(jxl.format.Alignment.CENTRE); //设置边框 arial12format.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); } catch (WriteException e) { e.printStackTrace(); } } /** * 初始化Excel * * @param fileName 导出excel存放的地址(目录) * @param colName excel中包含的列名(可以有多个) */ public static void initExcel(String fileName, String[] colName) { format(); WritableWorkbook workbook = null; try { File file = new File(fileName); if (!file.exists()) { file.createNewFile(); } workbook = Workbook.createWorkbook(file); //设置表格的名字 WritableSheet sheet = workbook.createSheet("账单", 0); //创建标题栏 sheet.addCell((WritableCell) new Label(0, 0, fileName, arial14format)); for (int col = 0; col < colName.length; col++) { sheet.addCell(new Label(col, 0, colName[col], arial10format)); } //设置行高 sheet.setRowView(0, 340); workbook.write(); } catch (Exception e) { e.printStackTrace(); } finally { if (workbook != null) { try { workbook.close(); } catch (Exception e) { e.printStackTrace(); } } } } @SuppressWarnings("unchecked") public static
2.问卷星怎么导出excel数据
问卷星导出excel数据:
1、在网页上找到问卷星官网,并打开。
2、在登录页面输入账号登录。
3、进入问卷星首页会出现你创建的问卷,在问卷下方,找到“分析下载”选项。
4、点击“分析下载”选项,在出现的选择栏里选择“查看下载答卷”。
5、进入“下载答卷”页面后,右上方有个“下载答卷数据”按钮,点击下拉选择“按文本选项下载”。
6、然后就会出现下载任务对话框,设置好文件名称和保存路径后,点击“下载”。
7、然后就可以看到文件数据被导出来成了excel格式文件了。
介绍:
问卷星是一个专业的在线问卷调查、测评、投票平台,专注于为用户提供功能强大、人性化的在线设计问卷、采集数据、自定义报表、调查结果分析系列服务。
与传统调查方式和其它调查网站或调查系统相比,问卷星具有快捷、易用、低成本的明显优势,已经被大量企业和个人广泛使用。
