How to make file to be visualized in Excel - excel

I've got a Groovy script that grabs the data I want out of a large text file. I want to make a tab-separated datafile with this script and then use the file for an Excel visualization. What is the best file type to create, and how do I create it in Groovy?
Thanks!

Why not just write it out as tab separated file as you say?
Or you could use Apache POI and HSSF with a groovy builder or something...

Related

how to convert txt to xls using cmd

I want to convert the result file txt which columns are separated in pipes (|) to an excel file spreedsheet.
I don't want to use Excel app. I need to do it via batch file.
what is the best option? I was thinking in an external app but I don't know which is the best.
I'm not sure about batch, but if you have access to PowerShell, the information here may help:
How to export a CSV to Excel using Powershell

Library or API that will compare two text file and generate a difference text file in groovy

I am using Groovy Script
Is there any Library or API that will compare two text file and generate a difference text file automatically.
Description:
I have on text file "old.txt" having some data. After I am changing the content of the "old.txt" like inserting one line, deleting one line and updating some line.
Can any one please tell is there any library that can compare and give the output as giving by the "TortiosUdiff" .patch file.
You should be able to use any Java library from your Groovy script. Here's one that appears to do what you need.

How to convert xls format to arff format?

I have a (.xls) data file and I want to use it in Weka.
I try to convert it with Weka converter as described in Weka tutorial, but after saving as .csv type I don't know how to tag the attribute or data.
Is there any other way to convert .xls format to arff?
You must work wtih csv files, they can be directly converted in command line:
java -cp "path/to/weka.jar" weka.core.converters.CSVLoader file.csv > file.arff
Please make sure that there are no quotation mark " for numeric data.
If you use non standard characters, use UTF-8 and add -Dfile.encoding=utf-8 when you start weka.
Any nominal or string data will be automatically converted
If you still have problems, please provide part of your csv file.
What do you mean by "how tag the attribute or data." ?
The following steps can solve your problem
Save your .xls file in .csv format.
Open the Weka GUI Chooser and then click on the tools button in the top menu bar.
Click on the Arffviwer
Choose file types to be loaded like, *.csv, *.data
Open *.csv file to view the data and values
Name the file with the .arff extension
Save the file

.dat file how to create one based on excel document

I have a .csv file in my matlab folder with 38 columns and about 48 thousand entries. I was hoping on using the findcluster gui but it only accepts .dat files.
How do I create a .dat file in matlab or specifically how do I convert the .csv file into a .dat file that can be used by the matlab fcm clustering tool?
example of csv:
how would I go about creating a data file for this kind of information?
The only documentation I could find about the file format was
The data set must have the extension .dat. For example, to load the data set,
clusterdemo.dat, type findcluster('clusterdemo.dat').
I checked clusterdemo.dat and found that the data is stored in ASCII format. Therefore, try
a = csvread('data.csv');
save 'data.dat' a -ASCII
Just rename xxx.csv to xxx.dat. This worked for me.
you should try changing extension.For changing extension you can go to folder settingļƒ and in view where we show hidden fileā€¦uncheck the hide extension for known files and now you can change the extension of any file by renaming it.
Because
There really isn't such a thing as 'dat' format, a 'dat' file is just a text file, it could theoretically have any extension you want.It could also be delimited however you want/need, it all really depends on what you are trying to achieve.
ie what are you going to use this file for?
If it's for use with another application then the requirements of that application will probably dictate how it's delimited/structured etc.
OR simply you can save the file from the excel as .csv and then later can change the extension.
It worked for me.

How can I convert an Excel file on a Linux server to a delimited text file?

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.

Resources