Convert Excel to XML in JEXCEL API

package com.relaytemplate.data;

import java.io.*;

import jxl.*;
import jxl.demo.XML;
import jxl.read.biff.BiffException;

import java.util.*;

import java.sql.*;

public class ExceltoXML{


// public void readExcelFile() {
public static void main(String args[]) throws BiffException, IOException{
File f = new File("TestConsolidated.xml");
OutputStream os = (OutputStream) new FileOutputStream(f);
String encoding = "UTF8";
OutputStreamWriter osw = new OutputStreamWriter(os, encoding);
String filename = "relaytemplate.xls";
WorkbookSettings ws = new WorkbookSettings();
ws.setLocale(new Locale("en", "EN"));
Workbook w = Workbook.getWorkbook(new File(filename), ws);
try {
XML myxml=new XML(w,os,filename, false);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Comments

  1. Blogs are not just to fill words it must have some aim and relevance to the readers. You achieved that here.
    Dissertation writing help

    ReplyDelete
  2. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Neppy Melange

    ReplyDelete

Post a Comment

Popular posts from this blog

defining functions clojure

Integrating Struts2 with Spring Security using Custom Login Form