Test to Read Excel File as XML with Format Properties

Q

How to run the test to read an existing Excel file as XML output with cell format properties with jxl.jar?

✍: FYIcenter.com

A

The following steps shows you how to run the test to read an existing Excel file as XML output with cell format properties with jxl.jar:

1. Open command line window to verify jxl.jar installation. "jxl.jar" file and "jxlrwtest" file are needed:

C:\cd \fyicenter\jexcelapi

C:\fyicenter\jexcelapi>dir
10/24/2009  10:11 AM           725,735 jxl.jar
09/07/2009  03:26 PM            93,696 jxlrwtest.xls
...

2. Use the "java -jar" command to run the test program:

C:\fyicenter\jexcelapi>\local\jdk-1.8.0\bin\java 
   -jar jxl.jar -xml -format jxlrwtest.xls | more

<?xml version="1.0" ?>
<!DOCTYPE workbook SYSTEM "formatworkbook.dtd">

<workbook>
  <sheet>
    <name><![CDATA[original]]></name>
    <row number="0">
      <col number="0">
        <data><![CDATA[Java Excel API Modify Test]]></data>
        <format wrap="false"
                align="general"
                valign="bottom"
                orientation="horizontal">
          <font name="Arial"
                point_size="14"
                bold_weight="700"
                italic="false"
                underline="none"
                colour="black"
                script="normal" />
        </format>
      </col>
    </row>
    <row number="1">
-- More  --

 

Demo Programs for jxl.jar

⇒⇒FAQ for Java Excel API jxl.jar

2018-04-07, 277👍, 0💬