Filter In Libreoffice

Posted onby admin

Fixed in LibreOffice 4.3.7/4.4.2. CVE-2015-1774 Out of bounds write in HWP file filter. Fixed in LibreOffice 4.2.7/4.3.3. CVE-2014-3693 Use-After-Free in socket manager of Impress Remote. Fixed in LibreOffice 4.2.6-secfix/4.3.1. CVE-2014-3524 CSV Command Injection and DDE formulas. CVE-2014-3575 Arbitrary File Disclosure using crafted OLE objects. LibreOffice / ˈ l iː b r ə / is a free and open-source office productivity software suite, a project of The Document Foundation (TDF). It was forked in 2010 from OpenOffice.org, which was an open-sourced version of the earlier StarOffice. Eigentumswohnungen zum Kauf in Franken - Alle Kaufangebote in der Region finden Sie bei immo.inFranken.de.

< Documentation‎ OOo3 User Guides‎ Calc Guide
  • Filters



Use filters to limit the visible rows in a spreadsheet. Generic filters, common to all sorts of data manipulations, are automatically provided by the auto filter capability. You can also define your own filters.

After applying a filter, some rows are visible and some rows are not. If you select multiple rows in one operation, you will also select the invisible rows contained between the selected visible rows. Operations, such as delete, act on all of the selected rows. To avoid this problem, you must individually select each of the filtered rows using the control key.

Auto filters

Use auto filters to quickly create easily accessible filters found to be commonly used in many different types of applications. After creating an auto filter for a specific column, a combo box is added to the column. The combo box provides quick access to each of the auto filter types.

  • The All auto filter causes all rows to be visible.
  • The Standard auto filter opens the Standard Filter dialog and is the same as the standard filter.
  • The Top 10 auto filter displays the ten rows with the largest value. If the value 70 is in the top ten values, then all rows containing the value 70 in the filtered column are displayed. In other words, more than ten rows may be displayed.
  • An auto filter entry is created for each unique entry in the column.

To create an auto filter, first select the columns to filter. For example, using the data in Table 1, select data in columns B and C. If you do not select the title rows, Calc asks if the title row or the current row should be used. Although you can place the auto filter in any row, only the rows below the auto filter are filtered. Use Data > Filter > AutoFilter to insert the auto filter combo box in the appropriate cell. Finally, use the drop-down arrow to choose an appropriate auto filter.

Use an auto filter with column C.

Remove an auto filter by repeating the steps to create the auto filter—in other words, the menu option acts as a toggle to turn the auto filter on and off. When an auto filter is removed, the combo box is removed from the cell. The macro in Listing 4 demonstrates creating an auto filter for a range.

Standard filters

Use Data > Filter > Standard Filter to open Standard Filter dialog and limit the view based on 1 to 3 filter conditions. Use Data > Filter > Remove Filter to turn off the filter.

Use the standard filter

The macro in Listing 5 creates a simple filter for the first sheet.

Listing 5. Create a simple sheet filter.

When a filter is applied to a sheet, it replaces any existing filter for the sheet. Setting an empty filter in a sheet will therefore remove all filters for that sheet (see Listing 6).

Color

Listing 6. Remove the current sheet filter.

Listing 7 demonstrates a more advanced filter that filters two columns and uses regular expressions. I noticed some unexpected behaviour while working with Listing 7. Although you can create a filter descriptor using any sheet cell range, the filter applies to the entiresheet.

Listing 7. A simple range filter using two columns.


Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Retrieved from 'https://wiki.openoffice.org/w/index.php?title=Documentation/OOo3_User_Guides/Calc_Guide/Filters&oldid=242118'

其实libreoffice有好多功能,完全可以替代office

1.windows下将word转为pdf

1 安装libreoffice

到官网下载后安装即可。https://donate.libreoffice.org/

安装完成后目录:

其实安装完我们发现其有好多功能,现在介绍几个重要的功能。

soffice.exe --- 类似于一个全收录功能,双击可以新建好多格式文本。

sweb.exe---类似于一个html的编辑器,可以编辑好多文件,可能与notpad++更像。

scalc.exe---类似于excel,对表格处理。

simpress.exe---类似于ppt

swriter.exe---类似于word,编辑文档(当然可以打开docx文档)

sbase.exe----对数据库进行操作,可以通过JDBC、ODBC连接数据库,没有可视化工具的时候可以用这个。

2.配置环境变量(为了我们能在任何情况下调用命令)

执行命令测试soffice

4.命令行转换pdf

转换到当前目录:

如果需要转换到指定目录可以加--outdir参数

5.java程序实现word转pdf(原理是通过cmd调用上述命令)

另一种命令的方式为 cmd /c soffice ..... .

另外写的时候最好pdf后面跟上 :writer_pdf_Export,例如: --convert-to pdf:writer_pdf_Export 可能会在转换失败后调用过滤器重写。

结果:

2018-10-25 21:56:35 [Test]-[DEBUG] exec cmd : soffice --headless --convert-to pdf C:/Users/liqiang/Desktop/ww/tt.docx --outdir C:/Users/liqiang/Desktop/ww
2018-10-25 21:56:45 [Test]-[DEBUG] i----0
2018-10-25 21:56:45 [Test]-[DEBUG] exec cmd exitStatus 0
2018-10-25 21:56:45 [Test]-[DEBUG] 用时:9980 ms

2.linux实现将word转为pdf,以centos为例

1.linux下安装libreoffice

1.下载

我们安装采用yum安装,首先下载rpm包。这里需要三个包。

其实我们在windows下通过浏览器访问上面链接也是可以下载tar.gz包的,如果需要不同的版本只需要修改url上的版本号即可。比如我想下载6.0.3的我可以访问下面url:

其实好多时候我们采用wget下载的时候如果下载不下来, 我们可以先在windows下访问url下载完只会传到linux服务器,这也是一种思路。

2.上传到服务器并解压

采用 tar -xvf xxxxxx.tar.gz解压即可。解压结果如下:

3.采用yum localinstall *.rpm安装rpm文件

RPMS下存放的是需要安装的rpm文件,进入该文件夹下采用通配符的方式安装即可。(三个tar.gz解压后的都需要安装)

4.测试libreoffice

安装后的命令是libreoffice6.0

5.为了使用libreoffice我们创建别名

2.linux下面命令行测试word转pdf(其参数与windows下的参数大体相同)

我们将上面生成的pdf传回windows下面查看发现中文乱码。

3.关于word转pdf中文乱码问题的解决办法

1.查看fonts目录

发现上面的字体存在/usr/share/fonts目录下。

2.把Windows下的字体C:WindowsFonts下的宋体,即simsun.ttc上传到linux服务器并赋值到上面的字体目录下赋予读写权限

赋予权限(默认权限也可以,如果不可以就手动赋予权限即可)

3.更新字体缓存

再次转换pdf发现完美解决。

4.linux下Java程序调用libreoffice转换pdf

文件的位置与输出目录通过主函数参数传递进去。

(1)先写一个简单的程序进行测试

我们在linux下面进行编译并且运行:

(2)接下来简单的编写程序获取转换时间:(使线程等待抓换完成)

再次在linux下面编译运行:

至此完成了使用libreoffice在windows与linux下面转换pdf,这种方式感觉比较稳定。同时也学会了Runtime 调用本地程序以单线程方式运行的方法。

文中用到的所有的tar包以及字体simsun.ttc下载地址:http://qiaoliqiang.cn/fileDown/linuxlibreoffice.zip

Fpe30

补充:word也可以转为html,测试word转html

word内容:

结果:

补充:word可以转jpg

Fpe30 10n Cross Reference

结果生成jpg:

补充:word可以转txt

结果:

补充:其实excel和ppt也可以转为pdf和html以及jpg,下面研究excel转换(只是边框被去掉,如果需要显示边框在excel中的样式需要显示边框;而且内容过长会折行,解决办法就是缩小列宽、减少列数)

原来excel内容:

Filter Data In Libreoffice

转换:

(1)转换后的jpg

(2)转换的html

(3)转换后的pdf

补充:直接拷贝目录遇到的问题:

今天拷贝下载好的目录使用时,发现报错缺失VCRUNTIME140.dll和MSVCP140.dll,于是拷贝另外一台电脑到缺失的电脑上就可以了。记住是C:WindowsSystem32目录和C:WindowsSysWOW64目录下对应的dll,这两个文件夹下的dll不一样,虽然文件名一样,但是大小不一样,所以要复制对应的dll。

Calc

补充;java也可以用jodconverter进行转换,我用的是jodconverter2.2版本(该工具包依赖openoffice或libreoffice插件)

依赖的jar包如下:

代码如下:

如果想去掉留痕,需要反编译jodconverter-2.2.2.jar,获取类OpenOfficeDocumentConverter.java,修改方法loadAndExport,如下:(加粗部分是添加的代码)

补充:基于libreoffice和jodconverter的文件在线预览插件,这个插件功能强大,使用简单

How To Filter In Libreoffice Calc

git地址: https://github.com/kekingcn/kkFileView

Color Filter In Libreoffice Calc

博客地址: https://my.oschina.net/keking/blog/3064732

Filter In Libreoffice

posted @ 2018-10-24 23:16QiaoZhi 阅读(23960) 评论(5) 编辑收藏