Converting XLS(X) to csv with ssconvert or something else - xlsx

I'm trying to convert XLS(X) files to csv on a RHEL server and have learned about gnumeric which includes ssconvert. I've done testing on a lab VM to make sure ssconvert works for what I need. However, I want to know if there is a way to install ssonvert by itself (with any libs/dependencies it needs) and not install everything else that comes with gnumeric.
Alternatively, is there another way to convert XLS(S) files to csv?

If you're open to installing LibreOffice, you can accomplish this using:
soffice --headless --convert-to csv yourfile.xlsx
The output will be comma-separated, newline delimited (though you should test specific behavior on your system to be sure).

Related

Gamemaker export code for Gource

Is there a way to use Gamemaker with Gource?
Or is there something like a tool or library to export / convert .gmk files to .txt files each of them with one class?
While pre-Studio projects are stored as single files, you can use Gmk-Splitter to split the .gmk file into a number of XML files (not too unlike the format used by GameMaker: Studio) or recompose the file from a set.
While not ideal, this permits to use source control with older versions of GameMaker. See the author's "Gang-Garrison-2" repository for an example of that in action.
With .gmk it's impossible. But if you will use GMS then you can try do it, because GMS uses .xml (i.e. text) files. I checked it with git and mercurial and it works fine.

Using bukhantsov.org command line query output with options

I am trying to use the tool here business objects query builder output
And there are virtually no examples, so I'm struggling to make it work. It produces no errors, but outputs no file in the directory where the batch file is, that I can see.
Here is the code inside querybuilder.bat:
set lib=c:\Program Files\Business Objects\Common\4.0\java\lib
java -cp "querybuilder.jar;poi-3.8-20120326.jar;%lib%\*" org.bukhantsov.querybuilder.Program %*
Here is the code inside what I am running, which I've named RunQuery_ALLACTIVE.bat, except of course with my Server, Username, and Password changed for the purpose of this post.
I have this all on one line, with no line breaks.
querybuilder.bat -cms:SERVER -username:OURUSERNAME -password:OURPASSWORD -query:"SELECT * FROM CI_INFOOBJECTS where SI_SCHEDULE_STATUS = 9 order by SI_NAME" -auth:windowsad -excel "Output.xls"
Can't tell if the - options go on different LINES ?
Can't tell if I'm supposed to put output file in quotes, or if it should be an existing file or not?
can't tell if for Windows AD (which we use), I would put "Windows AD" or WindowsAD, I'm assuming no spaces obviously.
Tons of unanswered questions on this tool - it LOOKS cool, but has anyone actually successfully used it? Can't really find comments or history on the 'net..
To answer your questions:
The options go on the same line, not on different ones
As Joe said, you'll need to specify the output file as -excel:"Output.xls"
If you want to use Windows AD, you'll probably need to specify secWinAD (case-sensitive).
If you're not sure about the command line options, I suggest you build up gradually: first only specify the required options, then add the optional ones one by one so you know which one is giving you problems.
Also, I noticed that the download page contains a version compiled for XI3.x and BI4. Make sure you use the correct version, corresponding to the version of BusinessObjects you're using. Also, verify the path in the batch file to see if it points to a valid folder containing the JAR files for the BusinessObjects environment.
Update:
I just noticed that the same author/developer created another application (GUI, not command line) that might be a bit easier to use. Have a look here.

Find multiple files from the command line

Description:
I am searching a very large server for files that is on a different server. right now I open command prompt and type
DIR [FILE NAME] /S/4
This returns the server location of the file with some other stuff that is not really needed.
Question:
I have a lot of files to search and one by one input into the above command could take forever. Is there a way I could input all of the names of all the files and only search once and the search results would only need to show file name and location?
First, I hope you don't mean DOS, but rather Windows cmd or batch.
You can certainly write a script that will run your DIR command once per file being sought.
But what you most likely want instead is to search once and print the path of each file found. For this you can use PowerShell's FindChildItem or the improved one posted here: http://windows-powershell-scripts.blogspot.in/2009/08/unix-linux-find-equivalent-in.html
It will be something like:
Find-ChildItem -Name "firstfile.txt|secondfile.txt|..."
Another approach is to install msys or cygwin or another Linux tools environment for Windows and use the Linux find command.

File encoding format through command prompt : Windows

I have a file which may be in ASCII or UTF-8 format. I can know which format it is through Notepad++. But can some one tel me a tool that could show me in which format the file is through command prompt.
Example:
Open Command Prompt,
C:><Some Command> FileName
which should give me the file format like ASCII or UTF-8.
Install Python 3.x
Run command in cmd.exe (Administrator): pip install chardet
Write a small python script that read a file, detect the encoding, and print the encoding using the newly installed module chardet. See here for help.
Put the script somewhere under PATH
Suppose you create ec.py doing the job. Then you can invoke ec FileName on command line to get the encoding. If you do a good job writing the python script, you can invoke something like ec *.txt to get the encodings of multiple files.
This is a duplicate of this question here which has a great answer (not by me I might add)
EDIT
I am pretty sure there is not way that is reliable to do this, usually you are told the encoding of a file, sure you can look for a Byte Order Mark (BOM) at the start of the file but its not mandatory and so is not a true indicator unless you know for SURE its supposed to be there.
Unless someone knows differently I don't think its possible to work out from scratch you have to have some clue about the encoding used.

Combining files in Notepad++

Is there a Notepad++ plugin out there that automatically combines all currently opened files into a single file?
Update: Yes, I am very aware of copy and paste :) I'm working with lots of files, and I want a solution that makes this step in the process a little bit faster than several dozen copy and pastes.
I'm aware of utilities for combining files, but I want the convenience of combining specifically the files that are currently opened in my text editor.
If there isn't a plugin out there already, I'll write one myself; I was just wondering if it exists already to save me the time of developing one.
I used the following command in DOS prompt to do the merge for me:
for %f in (*.txt) do type "%f" >> output.txt
It is fast and it works. Just ensure that all the files to be merge are in the same directory from where you execute this command.
http://www.scout-soft.com/combine/
Not my app, but this plug in lets you combine all open tabs into one file.
I installed the Python Script plugin and wrote a simple script:
console.show()
console.clear()
files = notepad.getFiles()
notepad.new()
newfile = notepad.getCurrentFilename()
for i in range(len(files) - 1):
console.write("Copying text from %s\n" % files[i][0])
notepad.activateFile(files[i][0])
text = editor.getText()
notepad.activateFile(newfile)
editor.appendText(text)
editor.appendText("\n")
console.write("Combine Files operation complete.")
It looks at all the files currently opened in Notepad++ and adds them to a new file. Does exactly what I need.

Resources