Categories
CSV

CSV/Excel Utility Package 2.3 released

As already announced last week, version 2.3 migrates the development to Maven build and deployment. Besides of this, it doesn’t add any functionality but upgraded Apache’s POI library to latest release 3.8.

You can download the new version here or visit the Homepage of the utility where you will find some examples on how to use it.

The Maven coordinates are:

<dependency>
  <groupid>eu.ralph-schuster</groupid>
  <artifactid>csv</artifactid>
  <version>2.3</version>
</dependency>
Categories
Bugzilla for Java CSV Compiling Templating

CSV, B4J and Templating become integrated with Maven

Some improvements are coming along. I was asked several times whether my Java projects could be based on Maven build so they can be more easily integrated with other projects. Now it’s coming around the corner. CSV/Excel Utility Package is almost complete and you can already see the results in the Nightly Build. The release is not far away, just a few more tests are remaining.

The Maven coordinates you would require are:

<dependency>
  <groupid>eu.ralph-schuster</groupid>
  <artifactid>csv</artifactid>
  <version>2.3</version>
</dependency>
 
<dependency>
  <groupid>eu.ralph-schuster</groupid>
  <artifactid>b4j</artifactid>
  <version>1.1</version>
</dependency>
 
<dependency>
  <groupid>eu.ralph-schuster</groupid>
  <artifactid>templating</artifactid>
  <version>1.1</version>
</dependency>

Please notice that none of these artifacts are yet released. Earlier releases will propably not become available via public repositories. But this isn’t decided yet.

By the way: The artifacts will be publicly available to you without any further Maven configuration as I will publish them to Sonatype’s official OSS repository which is part of Maven’s default repository list.

Categories
Bugzilla for Java CSV Projects Templating

Nightly Builds

To all of you who don’t want to wait for the next releases of any of my projects there are good news. I introduced Nightly Builds now which are linked on individual project’s pages. In case you detect any missing build, just send me a message via the contact page.

Categories
CSV

CSV/Excel Utility Package V2.1 released

I finished this release some months ago but didn’t find time yet to finally release it. Version 2.1 introduces some new features and classes that ease handling of table-like data from different sources:

  • New TableReader implementations for JDBC, XML, JTable
  • New TableWriter implementations for HTML and XML
  • Introduction of type conversion to allow object-string conversion and vice versa while reading and writing tables
  • New Reader and Writer wrappers that read and write JavaBeans.
  • New Filter implementations for TableReader that remove rows and columns.
  • Some abstract classes were separated into general base classes and stream-handling classes. This allows easier development of non-stream based implementations.

You can download the new version here or visit the Homepage of the utility where you will find some examples on how to use it.

Categories
CSV Java

CSV/Excel Utility Package V2.0.2 released

The package has undergone some minor bugfixing andJUnit Test was introduced for CSV files. Thanks to eldn for his help making this release.

You can download it here or visit the Homepage of the utility where you will find some examples on how to use it.

Categories
CSV

CSV/Excel Utility Package V2.0.1 released

It took me quite some time to upgrade this package to the next level and support Excel. It propably still has some flaws. However, I use it now for some months in production and fixed the most critical bugs. In fact, it seems to run quite stable now.

Please note that upgrading from previous version will require you to update your package imports.

You can download it here or visit the Homepage of the utility where you will find some examples on how to use it.

Categories
CSV Java

CSV Utility Package 2.0 Beta

Some work has been spent over the last weeks to upgrade the stable CSV Utility Package. Of course, the new version contains all the useful existing functionality. The most beneficial improvement is the introduction of ExcelReader and ExcelWriter classes that behave like the CSV pendants. This means that you do not have to care about the underlying output format when you want to read or write table-structured data. The most important changes are:

  • Introduction of a TableReader and TableWriter interface
  • Introduction of Excel implementation
  • Aligning CSV and Excel implementations to these interfaces
  • Introduction of a Factory class in order to select correct implementation (CSV or Excel)

The Beta version still requires some work in terms of documentation and code beautifying. However, the CSV part is already frozen and you can use it to upgrade your existing projects to the new utility version. The Excel part still faces some changes while improving usability.

Please be aware also that Java package structure needed to be changed to integrate the new classes and interfaces. Additionally, new 3rd party libraries were integrated (Apache POI and JavaBeans Activation).

Download the Beta Version or browse the existing API Documentation. Bugs and/or enhancements can be requested via Bugzilla.

Categories
Applications CSV

CSV Utility Package V1.0.2 released

I made some fixes and enhancements to the CSV Utility Package:

  • Bug #9: Spaces before and after a value are treated correctly now
  • Enhancement #10: CSVReader forwards comment lines to callback objects
  • Enhancement #11: A test script was integrated to check major features
  • New Class: CSVUtils offers methods for copying JDBC results and JTable data to CSVWriters

You can download the latest release here.

Categories
Applications CSV

CSV Utility Package V1.0.1 released

A new update of my CSV Utility Package was released. It contains some fixes and enhancements:

  • Build system creates tar archive
  • Fixed Bug #2: NullPointerException in CSVReader class
  • Fixed Bug #4: Multiline values fail when a line looks like a comment
  • Enhancement #7: Excel Fix: first column of first row must not start with “ID”
  • Enhancement #8: Add row and column count

You can download the latest release here.

Categories
CSV Java

CSV Utility Package Released

I decided recently to publish my very simple utility classes for reading and writing CSV files. The main project page is now available. The package, published under the GNU Lesser General Public License, allows you to easily integrate CSV functionality into your application. The utilities can be configured to use different column delimiter and separator characters in case you need to adopt some other versions of CSV. The default configuration conforms to the Excel style of CSV.

Since this CSV package uses streams, you are able to read from any stream. And, of course, you can write to any stream. You could even synchronize in your application by applying the reader/writer synchronization described in one of my artices.

You can download the latest stable release at the main project page.

Here is a short example on reading a CSV file using the CSVReader class:

java.io.File f = new java.io.File("csv-test.csv");
csv.CSVReader in = new csv.CSVReader(new java.io.FileReader(f));
while (in.hasNext()) {
    String columns[] = in.next();
    // Do something here
}
in.close();

Please note that the CSVReader class actually implements the Iterator interface.

Writing a CSV file is even easier. Just create an instance of the CSVWriter class and pass it your rows:

java.io.File f = new java.io.File("csv-test.csv");
CSVWriter out = new CSVWriter(new java.io.FileWriter(f));
out.printRow(new String[] { "0:0", "0:1", "0:2" });
out.printRow(new String[] { "1:0", "1:1", "1:2" });
out.close();

Documentation

The API documentation tells you all details and configuration parameters that you can use to control the behaviour of the reader and writer classes.