Anyone know of a free xls to text converter that can be run from the unix command line?
There is also the package catdoc (Ubuntu link) that includes a xls2csv utility.
A quick search of apt-cache turned up the Ubuntu package python-excelerator for excelerator, which includes py_xls2html, py_xls2csv and py_xls2txt utlities. Will this work for you?
Your question reminded me of anti-word. I looked up and found anti-excel. I have never used it, so I can't vouch for how well it work or whether it makes achievable the task you have at hand. Also, I remember using a utility called 'sc' on linux to created spreadsheets on the console---though, I do not know whether it is capable of interpreting XLS files.
I think gnumeric is better to convert document to csv http://xmodulo.com/2012/06/how-to-convert-xlsx-files-to-xls-or-csv.html
Related
Hello community!
I got quite hard question (at least i think so), my client uses Microsoft Word documents (I omit the naming of those files, many of them have silly names e.g. "ść ..doc"), is it possible to open those documents under e.g. Eclipse env using Python 3.6 under Ubuntu?
for many years I used Windows 7 operating system, but i want some change, so i installed Ubuntu 16.04 LTS, I downloaded environment (Eclipse oxygen 4.7.0), pydev etc... But i forgot that my main document is saved as *.doc file.
Is any possible way to open those files? what do you propose? I was thinking about some king of "indirect" *.xml file, but what kind of lib should I use to open *.doc files under LibreOffice software? (I do not want use some "hack" to install Microsoft Word under Ubuntu), and what after taking data from file? what kind of lib use to save data to *.doc file under ubuntu? (Cause my client will opened it with Microsoft Office)
The schema is simple
Open *doc files with Python 3.6 under ubuntu,
manipulate those files,
save as *.doc files under ubuntu.
Maybe use some COM object to open files under different operating systems? could someone share whit some kind of "documentation" of COM object used in Python 3.6 under ubuntu? (sorry if I am wrong, I only heard that i can use COM object, I do not use it before)
Thanks for all replays,
Greetings community!
Eldiane
use python docx and you can manipulate office documents without using com and it uses xml internally so its cross platform
for more information
click here
I use subprocess to call LibreOffice, which then opens the file (.doc or .xlsx).
For example,
import subprocess
subprocess.call((libreoffice, complete_file_path))
Note the two pairs of parentheses required for subprocess.call
The file then opens in LibreOffice.
Is there an easy way to convert HTML(with CSS styles and embedded images) to ODT, DOCX, DOC from the command line on linux server. I searched a lot but have not found a good option.
There was a problem the same way to convert to PDF, decided by wkhtmltopdf. Perhaps there are ways to convert the resulting PDF documents to other formats?
To convert to odt it's pretty easy after installing pandoc.
After the relatively hard part: from odt (or even html) you can script (Open|Libre)Office via e.g. unoconv
Or you can like:
abiword --to=doc filename.odt
Also see this thread, and this blog post.
HTH
If you want to convert HTML into docx you may use a solution like PHPDocX. You need to get the PRO version though because the free one does not include the conversion functionality.
If you're on ruby there is a gem based on libreoffice headless (with pyod/jod converter) and pdf tools.
Post with your issues to the pandoc GoogleGroup, John is very responsive in every way.
You may even find the latest release v1.9 may fix your problem, or maybe you just need to get to know the toolset in more detail.
I found soultion - is abiword in console variant.
I need to convert over 100 Excel files to CSV. Worse these files consist of multiple sheets and I only need one of them.
At first I stumbled upon the Perl program xls2csv. Luckily I even found on XLS file conversion at the bottom a convenient script that converts all sheets into seperate csv files. But unluckily this converter is broken and skips lines.
I also tried pyodconverter but that only converts the first sheet.
Any suggestions? It would be ok if that conversion had to be done on Windows though I would really prefer Linux. And if it has to be Windows it would be nice if it wouldn't need an Excel installation.
There's a very useful java library called Apache POI at http://poi.apache.org/
The following link provides an example application that converts xls to csv.
http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java
If you know java you can adjust it to your needs. Since it's java it runs also on linux.
you could also have a look at StatTransfer... (Win only, I'm afraid)
I know this is late but there is actually an HTA (HTML Application) which can do this. The details and download link can be found here.
I am running a Linux server and one of our suppliers only knows how to send me an Excel file which I need to import into our system daily. Does anyone know of a good way to export the Excel file to a delimited file? Preferably with php or perl.
Thanks!
Chris Edwards
Java library POI does this quite well, with very simple API.
http://poi.apache.org/
OpenOffice (or LibreOffice) has a scripting ability, alas, which I have never looked at. However, it seems it would be straightforward to open the Excel file using Calc, and then do a Save As .csv operation.
I have a question about PDF security preferences. Can I change an editable pdf to readable pdf programmatically?
Yes - with for example PDFStamp on Windows (Command line reference)
My Perl CAM::PDF library has a command-line utility called rewritepdf.pl that can do this quite easily with the -P flag. The library exposes this functionality quite easily, too.
Yes, adding security to a PDF which stops people from being able to edit it, is quite easy using a variety of different PDF toolkits (iText, PDFSharp, Quick PDF Library, etc).
PDF encryption may not be honored in some tools.
You can use tools such as PDFLEO to encrypt PDF documents (command line reference)