| Author |
Creating a CSV File from a HashMap
|
Bhanu Pratap
Greenhorn
Joined: Jun 16, 2005
Posts: 1
|
|
Hi, I need to create a csv(Comma Separated Value) File from a given Hashmap. one important thing here is the Hashmap may contain Vectors or Collection or object as Values and inturn those objects may contain Vectors or Collections and so on.. can anyone help me out in this. Thanks in advance
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
To iterate through the Hashmap you can either use the keySet or the values - it would depend on whether you need the keys to appear in the output. You can use the instanceof operator to determine what the retrieved value object is and branch accordingly. Exactly how anybody could interpret a CSV file created from such a motley collection is hard to imagine. Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: Creating a CSV File from a HashMap
|
|
|