Problem:
I am looking for a way to generate a SPSS file using PL/ SQL. Currently, I am able to generate a .csv file with roughly 300-400 columns. I have tried to google and didn't have any luck in finding a way to generate SPSS file using PL/SQL.
Expected Solution:
Either generate a SPSS file directly OR use some kind of java class like one this program SPSS Writer uses to convert the .csv file into SPSS. My understanding is that we would need to provide the metadata file in order to convert the csv file into SPSS.
Any suggestions would be much appreciated.
If you are trying to generate a sav file without SPSS you can write a program using the SPSS io modules available free via the SPSS community website.
Related
In my project which deals with SAS
we have risk binary files of extension .rskcdesc
I have been looking but not able to find any python Java library which can read it.
I need to automate data checks via Backend process, hence need a way to decode these files.
Any suggestions?
Rohit,
I don't have SAS Risk but SAS has been using zip for some of their files (like EG projects). Try renaming the file extension to .zip and open it. It may be comprised of XML files, similar to EG.
I'm trying to find the best way to read .evtx files in JAVA the only almost valid solution I found is parsing it to a csv file using windows power shell (takes about a minute to parse a file with 250 lines) and then reading the csv file with missing data.
is there any better options for reading evtx files in JAVA?
Thanks.
You may want to check an open source library here.
It parses evt files (old version of Windows event log), not sure if it will tackle evtx files.
I see many suggestions to use the jchm jar to do this. However I don't see any code which shows how to read the chm file using the jchm jar.
I used hh.exe -decompile [destination_folder] chmfile.chm to decompile the .chm into its underlying .htm files. I am now writing java code to parse all these .htm to create a tree structure to store the complex structure of hyperlinks in the .chm file.
Actually I am attempting to extract the data from a PDF file but I didn't find any example in the internet and I am asking if there is any possibility that I can use the JPedal library to open to read the data from a PDF file.
You can use PDFBox from Apache.
I am not familiar with JPedal, but I write lots of code that generates and processes pdf files. I use IText and highly recommend it. If you have a specific question on how to process a pdf file, let me know.
I'm trying to read excel file and pass all the data to DB. I found a few code examples but all of them required external jars. How can I read excel files using only the standard library?
IF you don't want to use a library then you will have to download the Excel file format specs from MS and write an Excel parser yourself (which is extremely complicated and takes > 10 years for one developer). For the OpenXML format spec see here and here.
Thus I really recommend using a library for that...
Try Apache POI - a free Java library for dealing with MS Office documents..
You can save as the excel file *.cvs and sperated ";". Then, you can read file line by line and get the columns which is getting from each token.
Microsoft excel uses a binary way to save its data, so manually reading excel files might be a hassle. If you could convert the excel (xls) to a comma seperated values (csv) file, then you can just read the file and split your input on the comma's.
This is a difficult problem. First off, it is not as simple as "adding a third party library". There are no existing EXCEL reading libraries that do not cost money and the one that I know that does work is very expensive AND has bugs in it.
One strategy is to create an Excel add in that reads the data and transfers it to your application by OLE or the clipboard or by a TCP/IP port or saves it to a temporary file. If you look in the source code for OPeNDAP.org's ODC project you can find an Excel add in and TCP capability to do this.
You can try referring to the reader in OpenOffice which is open source code, however, in my opinion that code is not easily refactorable into a private project for various reasons.
Microsoft has components and tools to open Excel files and expose them via COM objects.
You can also learn the BIFF format and write your own parser. You probably would want to write a parser for BIFF5, but be forewarned, this is a BIG project, even if you only parse a limited number of data types.