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();
}
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();
}
Blogs are not just to fill words it must have some aim and relevance to the readers. You achieved that here.
ReplyDeleteDissertation writing help
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