Tag: 展开

如何通过使用超链接在Excel中扩展组(或者可能将macros分配给超链接)

我的表格顶部有一个表格,这个表格有不同的部分名称。 我想插入一个超链接到这些部分的名称,当我点击它们时打开它的组。 请参考我的表格和部分视图默认(折叠) 我可以创build一个macros: Expands all groups Goes to the Section that I clicked, Collapses all groups Only opens the group on active cell, 但是将这个macros分配给〜20个不同的部分会增加文件的大小。 经过一些search后,我发现这个: Excel:将macros分配给超链接? 所以也许有办法连接这两种方法? 这怎么解决?

Apache POI Excel – 如何configuration要扩展的列?

我正在使用Apache POI API来生成excel spreadsheet来输出一些数据。 我面临的问题是当电子表格被创build和打开时,列不会被展开,所以像date格式文本这样的长文本一眼就看不到。 我可以双击在Excel中的列边框来扩大或拖动边框来调整列宽,但可能有20 +列,我不想每次打开电子表格时手动: 我发现(虽然可能是错误的方法) groupRow()和setColumnGroupCollapsed()可能能够做到这一点,但没有运气。 也许我用错了方法。 示例代码片段 Workbook wb = new HSSFWorkbook(); CreationHelper createHelper = wb.getCreationHelper(); //create sheet Sheet sheet = wb.createSheet("masatoSheet"); //not really working yet…. 🙁 //set group for expand/collapse //sheet.groupRow(0, 10); //just random fromRow toRow argument values… //sheet.setColumnGroupCollapsed(0, true); //create row Row row = sheet.createRow((short)0); //put a cell in […]