SlideShare a Scribd company logo
CSV to XML Converter


          Converts Comma-Separated-Value
csv
 csv
   csv        files to Xcelsius – SAP BO
           Dashboards 4.x compliant XML-
                          files
XML
 XML
  XML


                               Copyright – Gino Scheppers
CSVtoXML

   CSVtoXML (CSVtoXML.jar) is a „command-line driven‟
    Java-program, it converts one or more CSV-files to one
    or more Xcelsius & SAP BO Dashboards 4.x compliant
    XML-files.
   The program is platform independent. Runs in Windows,
    Sun Solaris, Unix, Linux,…
   CSVtoXML is freeware.
   Requisites:
       Java JRE 1.5 or higher
CSVtoXML
   Running the program with the –Help option, will result in an overview of
    all the available parameters.
   Cmd: java –jar <installdir>CSVtoXML.jar -Help
usage:
    CSVtoXML

   The program is a command-line driven java
    program, that can run from within a batch-file or
    script-file (like *.cmd, *. bat, …).
   Usage:
       java -jar <install dir>CSVtoXML.jar [Options]
       Example:
           java -jar “C:Program FilescsvtoxmlCSVtoXML.jar” -Help
   Important !
       All command-line-options are case-sensitive !
Option overview:
    CSVtoXML

   Option: -Help
       Shows all parameter options
   Usage:
       java -jar <install dir>CSVtoXML.jar -Help
       Example:
           java -jar “C:Program FilescsvtoxmlCSVtoXML.jar” -Help
Option overview:
    CSVtoXML

   Option: -cleanDirectory
       This option will clean the source-folder after the conversion process.
       Important: this option will clean the complete folder! In this case, the
        output-folder should be different from the source-folder, otherwise you
        will end-up with no files!
   Usage:
       java -jar <install dir>CSVtoXML.jar -cleanDirectory -sourceFolder
        c:/temp/csv -destinationFolder c:/temp/xml
       The above example will convert all files with extension *.txt and *.csv
        (=default behavior) in the source-folder to the destination-folder, after
        the conversion, all files in the source-folder will be deleted.
Option overview:
    CSVtoXML

   Option: -csvFilename <arg>
       Use this option to indicate the file to convert
       Important:
           Use slash instead of backslash in the path definition
                <arg> = <drive:/path/filename>
                <arg> = <//server/share/path/filename>

   Usage:
       java -jar <install dir>CSVtoXML.jar -csvFilename
        c:/temp/csv/kpi.csv
           The above example will convert the file kpi.csv to kpi.xml in the folder
            c:tempxml.
       java -jar <install dir>CSVtoXML.jar -csvFilename kpi.csv -
        sourceFolder c:/temp/csv/ -destionationFolder c:/temp/xml
           In the above example, the converted file will be placed in the folder c:tempxml
Option overview:
    CSVtoXML

   Option -sourceFolder <arg>
       Use this option to indicate the source path
       Important:
          Use slash instead of backslash in the path definition
               <arg> = <drive:/path/>
               <arg> = <//server/share/path/>
           Using this option without the -csvFilename option will convert all
            files in the source-folder
   Usage – example:
       java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/
           The above example will convert all files (with extension *.csv and *.txt) in the
            folder c:tempcsv. The result will be placed in the same folder
Option overview:
    CSVtoXML

   Option: -destinationFolder <arg>
       Use this option to indicate the destination path
       Important:
          Use slash instead of backslash in the path definition
               <arg> = <drive:/path/>
               <arg> = <//server/share/path/>
           If you don‟t use this option, all converted files will be placed into
            the source-folder
           Tip: if the target-folder doesn‟t exist, it will be created by the
            program.
   Usage:
       java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ -
        destinationFolder c:/temp/xml
           The above example will convert all files (with extension *.csv and *.txt) in the
            folder c:tempcsv. The result will be placed in c:tempxml
Option overview:
    CSVtoXML

   Option: -xmlFilename <arg>
       Default: the source-file name will be used as destination-file name,
        use this option if you want to rename the destination filename into
        another filename.
       Important:
           you can use the merge-option (see next slide) if you want to merge all files into
            one file.
   Usage:
       java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ -
        destionationFolder c:/temp/xml -csvFilename kpi.csv -xmlFilename
        myXML.xml
           The above example will convert the file kpi.csv in the folder
            c:tempcsv into the xml-file myXML.xml in the directory
            c:tempxml
Option overview:
    CSVtoXML

   Option: -merge
       Use this option to merge all the converted files into one xml-file
       Important:
           Use this option in combination with the –xmlFilename option
   Usage – example:
       java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ -
        destionationFolder c:/temp/xml -merge -xmlFilename myXML.xml
           The above example will convert all files (with extension *.csv and
            *.txt) in the folder c:tempcsv into one xml-file (myXML.xml)
            into the directory c:tempxml
           The source-filename without extension will be used as variable
            tag-name.
Option oveview:
    CSVtoXML

   Option: -variableNameRange <arg>
       Default, the name of the source-file (without extension) will be used as
        variable name tag, use this option if you want to change the <variable
        name>-tag into another name.
       Important:
           Don‟t use this option in combination with the –merge option
   Usage – example:
       java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ -
        destionationFolder c:/temp/xml -csvFilename kpi.csv -
        variableNameRange kpi -xmlFilename myXML.xml
           The above example will convert the file kpi.csv in the folder
            c:tempcsv into one xml-file (myXML.xml) into the directory
            c:tempxml using kpi as variable-name tag.
Option overview:
    CSVtoXML

   Option: -zipFilename <arg>
       Use this option to indicate the name of the backup-file
       Important:
          Use slash instead of backslash in the path definition
               <arg> = <drive:/path/filename>
               <arg> = <//server/share/path/filename>
           If the target folder doesn‟t exist, it will be created.
           Using #date# or #datetime# in the name to replace it with the current date
            (format: yyyyMMdd ) or with the current timestamp (format:
            yyyyMMdd_HHmmss)
   Usage – example:
       java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ -
        zipFilename c:/temp/zip/myZip#date#.zip
           The above example will convert all files (with extension *.csv and *.txt) in the
            folder c:tempzip, and zip into the file myZip20121101.zip
Option overview:
    CSVtoXML

   Option: -extensionFilter <arg>
       Default all files with extension *.csv and *.txt will be converted, use
        this option if you want to specify files with an other extension.
       Important:
           Use ; as delimiter if you want to specify more then one extension.
   Usage – example:
       java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ -
        extensionFilter csv;txt;prn
           The above example will convert all files with extension *.csv, *.txt and *.prn in the
            folder c:tempcsv, into the same folder




                                       convert
Option overview:
    CSVtoXML
   Option: -delimiter <arg>
       Default ; is used as delimiter in the csv-file, use this option if you want
        to use an other delimiter.
   Usage – example:
       java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ -
        delimiter #
             The above example will convert all files with extension *.csv, *.txt in the folder
              c:tempcsv, into the same folder, using a crossroad (#) as delimiter.



        csv


                                                 xml
Example: converting two csv-files to one xml-file
   Suppose you want to monitor the number of BO accounts in a three pillar environment (dev,
    accept & production) on two different BO installations (Infra. One & Infra. Two)
   On a daily basis you receive two csv-files (InfraOne.csv and InfraTwo.csv) in the C:tmpcsv
    folder.
   Create a cmd-file with the following command to convert the two csv‟s to one xml-file.
        java -jar CSVtoXML.jar -sourceFolder "C:/tmp/csv/" -destinationFolder "C:/tmp/xml/" -
         merge -xmlFilename MergedXML.xml
        Create a dashboard using the XML-data connector
        read the next slides for more info
Example: converting two csv-files to one xml-file

        DWH


 Query & Export to csv




Convert with CSVtoXML.jar
Example: converting two csv-files to one xml-file
Example: converting two csv-files to one xml-file

Tip: define two Excel Named Ranges
with the same name of your variable
name – tag




                                      Important: The Import Named Ranges-
                                      button imports the Excel ranges, not the
                                      variable name-section in the xml-file!
Example: converting two csv-files to one xml-file
Refreshing your dashboard with new xml-data will result in a ‘Cannot Access External
Data’ error message. You will need to make a trusted version of your swf-file!
Steps
1. Right-click on the swf in the browser and click on Global Settings…
2. Click on the Advanced-tab and click on the Trusted Location Settings-
   button
3. Add the name of the swf-file as trusted file

4. Restart your dashboard in the browser
Logging Services

   Default „Log4j 1.2.16‟ from apache.org is used to
    log the program activity.
   Read http://logging.apache.org/log4j/1.2/ for more
    info.
   Tip: replace the original log4j.properties file in
    CSVtoXML.jar (use winzip to open the jar) with your own
    configuration file to customize the logging output.
   More info:
       http://www.tutorialspoint.com/log4j/log4j_configuration.htm
       http://logging.apache.org/log4j/1.2//apidocs/org/apache/log4j/EnhancedPatternLayout.html

More Related Content

What's hot

Basic commands
Basic commandsBasic commands
Basic commands
ambilivava
 
Sas bulk load
Sas bulk loadSas bulk load
Sas bulk load
mprabhuram
 
Linux com
Linux comLinux com
Hadoop 20111117
Hadoop 20111117Hadoop 20111117
Hadoop 20111117
exsuns
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBase
Amal Abid
 
Linux
LinuxLinux
ちょっとHadoopについて語ってみるか(仮題)
ちょっとHadoopについて語ってみるか(仮題)ちょっとHadoopについて語ってみるか(仮題)
ちょっとHadoopについて語ってみるか(仮題)
moai kids
 
Examples -partII
Examples -partIIExamples -partII
Examples -partII
Kedar Bhandari
 
PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12
Andrew Dunstan
 
Perintah dasar terminal kali linux
Perintah dasar terminal kali linuxPerintah dasar terminal kali linux
Perintah dasar terminal kali linux
Faizalguswanda
 

What's hot (10)

Basic commands
Basic commandsBasic commands
Basic commands
 
Sas bulk load
Sas bulk loadSas bulk load
Sas bulk load
 
Linux com
Linux comLinux com
Linux com
 
Hadoop 20111117
Hadoop 20111117Hadoop 20111117
Hadoop 20111117
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBase
 
Linux
LinuxLinux
Linux
 
ちょっとHadoopについて語ってみるか(仮題)
ちょっとHadoopについて語ってみるか(仮題)ちょっとHadoopについて語ってみるか(仮題)
ちょっとHadoopについて語ってみるか(仮題)
 
Examples -partII
Examples -partIIExamples -partII
Examples -partII
 
PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12
 
Perintah dasar terminal kali linux
Perintah dasar terminal kali linuxPerintah dasar terminal kali linux
Perintah dasar terminal kali linux
 

Viewers also liked

The Ultimate Date Time Universe solution (Quick Start and Setup MS SQL Server)
The Ultimate Date Time Universe solution (Quick Start and Setup MS SQL Server)The Ultimate Date Time Universe solution (Quick Start and Setup MS SQL Server)
The Ultimate Date Time Universe solution (Quick Start and Setup MS SQL Server)
Gino Scheppers
 
SAP BusinessObjects Embedded analytics
SAP BusinessObjects Embedded analyticsSAP BusinessObjects Embedded analytics
SAP BusinessObjects Embedded analytics
Ingo Hilgefort
 
Portal Integration with SAP BusinessObjects (SDK)
Portal Integration with SAP BusinessObjects (SDK)Portal Integration with SAP BusinessObjects (SDK)
Portal Integration with SAP BusinessObjects (SDK)
DMIMarketing
 
Action research for_librarians_carl2012
Action research for_librarians_carl2012Action research for_librarians_carl2012
Action research for_librarians_carl2012
srosenblatt
 
Small Data Assessment and Action Research
Small Data Assessment and Action ResearchSmall Data Assessment and Action Research
Small Data Assessment and Action Research
srosenblatt
 
Catastrophes maritimes oufff
Catastrophes maritimes oufffCatastrophes maritimes oufff
Catastrophes maritimes oufffD'HONDT Bertrand
 
PDF File Creating Subject Guides for the 21st Century Library by Buffy Hamilton
PDF File Creating Subject Guides for the 21st Century Library by Buffy HamiltonPDF File Creating Subject Guides for the 21st Century Library by Buffy Hamilton
PDF File Creating Subject Guides for the 21st Century Library by Buffy Hamilton
Buffy Hamilton
 
Building the Digital Branch: Designing Effective Library Websites
Building the Digital Branch: Designing Effective Library WebsitesBuilding the Digital Branch: Designing Effective Library Websites
Building the Digital Branch: Designing Effective Library Websites
David King
 
7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec
Eugene Cheng
 

Viewers also liked (9)

The Ultimate Date Time Universe solution (Quick Start and Setup MS SQL Server)
The Ultimate Date Time Universe solution (Quick Start and Setup MS SQL Server)The Ultimate Date Time Universe solution (Quick Start and Setup MS SQL Server)
The Ultimate Date Time Universe solution (Quick Start and Setup MS SQL Server)
 
SAP BusinessObjects Embedded analytics
SAP BusinessObjects Embedded analyticsSAP BusinessObjects Embedded analytics
SAP BusinessObjects Embedded analytics
 
Portal Integration with SAP BusinessObjects (SDK)
Portal Integration with SAP BusinessObjects (SDK)Portal Integration with SAP BusinessObjects (SDK)
Portal Integration with SAP BusinessObjects (SDK)
 
Action research for_librarians_carl2012
Action research for_librarians_carl2012Action research for_librarians_carl2012
Action research for_librarians_carl2012
 
Small Data Assessment and Action Research
Small Data Assessment and Action ResearchSmall Data Assessment and Action Research
Small Data Assessment and Action Research
 
Catastrophes maritimes oufff
Catastrophes maritimes oufffCatastrophes maritimes oufff
Catastrophes maritimes oufff
 
PDF File Creating Subject Guides for the 21st Century Library by Buffy Hamilton
PDF File Creating Subject Guides for the 21st Century Library by Buffy HamiltonPDF File Creating Subject Guides for the 21st Century Library by Buffy Hamilton
PDF File Creating Subject Guides for the 21st Century Library by Buffy Hamilton
 
Building the Digital Branch: Designing Effective Library Websites
Building the Digital Branch: Designing Effective Library WebsitesBuilding the Digital Branch: Designing Effective Library Websites
Building the Digital Branch: Designing Effective Library Websites
 
7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec
 

Similar to CSV to XML Converter

CMake Tutorial
CMake TutorialCMake Tutorial
CMake Tutorial
Fu Haiping
 
Makefiles Bioinfo
Makefiles BioinfoMakefiles Bioinfo
Makefiles Bioinfo
Giovanni Marco Dall'Olio
 
DocBlox: your source matters @ #pfc11
DocBlox: your source matters @ #pfc11DocBlox: your source matters @ #pfc11
DocBlox: your source matters @ #pfc11
Mike van Riel
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To Ant
Rajesh Kumar
 
Vim and Python
Vim and PythonVim and Python
Vim and Python
majmcdonald
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
nitin lakhanpal
 
Angular2 ecosystem
Angular2 ecosystemAngular2 ecosystem
Angular2 ecosystem
Kamil Lelonek
 
Transformation csvtoxml
Transformation csvtoxmlTransformation csvtoxml
Transformation csvtoxml
Antonio Pellegrino
 
Transformation csvtoxml
Transformation csvtoxmlTransformation csvtoxml
Transformation csvtoxml
Germano Barba
 
ACADGILD:: HADOOP LESSON
ACADGILD:: HADOOP LESSON ACADGILD:: HADOOP LESSON
ACADGILD:: HADOOP LESSON
Padma shree. T
 
Integration Group - Robot Framework
Integration Group - Robot Framework Integration Group - Robot Framework
Integration Group - Robot Framework
OpenDaylight
 
Transformation from csv to xml
Transformation  from csv to xmlTransformation  from csv to xml
Transformation from csv to xml
Nagarjuna reddy
 
Translation from csv to xml
Translation from csv to xmlTranslation from csv to xml
Translation from csv to xml
Nagarjuna reddy
 
Basic linux commands
Basic linux commands Basic linux commands
Basic linux commands
Raghav Arora
 
Transformation csvtoxml
Transformation csvtoxmlTransformation csvtoxml
Transformation csvtoxml
Davide Rapacciuolo
 
Introduction to Command Line & Batch files
Introduction to Command Line& Batch filesIntroduction to Command Line& Batch files
Introduction to Command Line & Batch files
Hayder F. Shamary
 
Java packages
Java packagesJava packages
Java packages
Jeffrey Quevedo
 
12 yum
12  yum12  yum
12 yum
12  yum12  yum
playbooks.pptx
playbooks.pptxplaybooks.pptx
playbooks.pptx
BaskarKannanK
 

Similar to CSV to XML Converter (20)

CMake Tutorial
CMake TutorialCMake Tutorial
CMake Tutorial
 
Makefiles Bioinfo
Makefiles BioinfoMakefiles Bioinfo
Makefiles Bioinfo
 
DocBlox: your source matters @ #pfc11
DocBlox: your source matters @ #pfc11DocBlox: your source matters @ #pfc11
DocBlox: your source matters @ #pfc11
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To Ant
 
Vim and Python
Vim and PythonVim and Python
Vim and Python
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
 
Angular2 ecosystem
Angular2 ecosystemAngular2 ecosystem
Angular2 ecosystem
 
Transformation csvtoxml
Transformation csvtoxmlTransformation csvtoxml
Transformation csvtoxml
 
Transformation csvtoxml
Transformation csvtoxmlTransformation csvtoxml
Transformation csvtoxml
 
ACADGILD:: HADOOP LESSON
ACADGILD:: HADOOP LESSON ACADGILD:: HADOOP LESSON
ACADGILD:: HADOOP LESSON
 
Integration Group - Robot Framework
Integration Group - Robot Framework Integration Group - Robot Framework
Integration Group - Robot Framework
 
Transformation from csv to xml
Transformation  from csv to xmlTransformation  from csv to xml
Transformation from csv to xml
 
Translation from csv to xml
Translation from csv to xmlTranslation from csv to xml
Translation from csv to xml
 
Basic linux commands
Basic linux commands Basic linux commands
Basic linux commands
 
Transformation csvtoxml
Transformation csvtoxmlTransformation csvtoxml
Transformation csvtoxml
 
Introduction to Command Line & Batch files
Introduction to Command Line& Batch filesIntroduction to Command Line& Batch files
Introduction to Command Line & Batch files
 
Java packages
Java packagesJava packages
Java packages
 
12 yum
12  yum12  yum
12 yum
 
12 yum
12  yum12  yum
12 yum
 
playbooks.pptx
playbooks.pptxplaybooks.pptx
playbooks.pptx
 

CSV to XML Converter

  • 1. CSV to XML Converter Converts Comma-Separated-Value csv csv csv files to Xcelsius – SAP BO Dashboards 4.x compliant XML- files XML XML XML Copyright – Gino Scheppers
  • 2. CSVtoXML  CSVtoXML (CSVtoXML.jar) is a „command-line driven‟ Java-program, it converts one or more CSV-files to one or more Xcelsius & SAP BO Dashboards 4.x compliant XML-files.  The program is platform independent. Runs in Windows, Sun Solaris, Unix, Linux,…  CSVtoXML is freeware.  Requisites:  Java JRE 1.5 or higher
  • 3. CSVtoXML  Running the program with the –Help option, will result in an overview of all the available parameters.  Cmd: java –jar <installdir>CSVtoXML.jar -Help
  • 4. usage: CSVtoXML  The program is a command-line driven java program, that can run from within a batch-file or script-file (like *.cmd, *. bat, …).  Usage:  java -jar <install dir>CSVtoXML.jar [Options]  Example:  java -jar “C:Program FilescsvtoxmlCSVtoXML.jar” -Help  Important !  All command-line-options are case-sensitive !
  • 5. Option overview: CSVtoXML  Option: -Help  Shows all parameter options  Usage:  java -jar <install dir>CSVtoXML.jar -Help  Example:  java -jar “C:Program FilescsvtoxmlCSVtoXML.jar” -Help
  • 6. Option overview: CSVtoXML  Option: -cleanDirectory  This option will clean the source-folder after the conversion process.  Important: this option will clean the complete folder! In this case, the output-folder should be different from the source-folder, otherwise you will end-up with no files!  Usage:  java -jar <install dir>CSVtoXML.jar -cleanDirectory -sourceFolder c:/temp/csv -destinationFolder c:/temp/xml  The above example will convert all files with extension *.txt and *.csv (=default behavior) in the source-folder to the destination-folder, after the conversion, all files in the source-folder will be deleted.
  • 7. Option overview: CSVtoXML  Option: -csvFilename <arg>  Use this option to indicate the file to convert  Important:  Use slash instead of backslash in the path definition  <arg> = <drive:/path/filename>  <arg> = <//server/share/path/filename>  Usage:  java -jar <install dir>CSVtoXML.jar -csvFilename c:/temp/csv/kpi.csv  The above example will convert the file kpi.csv to kpi.xml in the folder c:tempxml.  java -jar <install dir>CSVtoXML.jar -csvFilename kpi.csv - sourceFolder c:/temp/csv/ -destionationFolder c:/temp/xml  In the above example, the converted file will be placed in the folder c:tempxml
  • 8. Option overview: CSVtoXML  Option -sourceFolder <arg>  Use this option to indicate the source path  Important:  Use slash instead of backslash in the path definition  <arg> = <drive:/path/>  <arg> = <//server/share/path/>  Using this option without the -csvFilename option will convert all files in the source-folder  Usage – example:  java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/  The above example will convert all files (with extension *.csv and *.txt) in the folder c:tempcsv. The result will be placed in the same folder
  • 9. Option overview: CSVtoXML  Option: -destinationFolder <arg>  Use this option to indicate the destination path  Important:  Use slash instead of backslash in the path definition  <arg> = <drive:/path/>  <arg> = <//server/share/path/>  If you don‟t use this option, all converted files will be placed into the source-folder  Tip: if the target-folder doesn‟t exist, it will be created by the program.  Usage:  java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ - destinationFolder c:/temp/xml  The above example will convert all files (with extension *.csv and *.txt) in the folder c:tempcsv. The result will be placed in c:tempxml
  • 10. Option overview: CSVtoXML  Option: -xmlFilename <arg>  Default: the source-file name will be used as destination-file name, use this option if you want to rename the destination filename into another filename.  Important:  you can use the merge-option (see next slide) if you want to merge all files into one file.  Usage:  java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ - destionationFolder c:/temp/xml -csvFilename kpi.csv -xmlFilename myXML.xml  The above example will convert the file kpi.csv in the folder c:tempcsv into the xml-file myXML.xml in the directory c:tempxml
  • 11. Option overview: CSVtoXML  Option: -merge  Use this option to merge all the converted files into one xml-file  Important:  Use this option in combination with the –xmlFilename option  Usage – example:  java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ - destionationFolder c:/temp/xml -merge -xmlFilename myXML.xml  The above example will convert all files (with extension *.csv and *.txt) in the folder c:tempcsv into one xml-file (myXML.xml) into the directory c:tempxml  The source-filename without extension will be used as variable tag-name.
  • 12. Option oveview: CSVtoXML  Option: -variableNameRange <arg>  Default, the name of the source-file (without extension) will be used as variable name tag, use this option if you want to change the <variable name>-tag into another name.  Important:  Don‟t use this option in combination with the –merge option  Usage – example:  java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ - destionationFolder c:/temp/xml -csvFilename kpi.csv - variableNameRange kpi -xmlFilename myXML.xml  The above example will convert the file kpi.csv in the folder c:tempcsv into one xml-file (myXML.xml) into the directory c:tempxml using kpi as variable-name tag.
  • 13. Option overview: CSVtoXML  Option: -zipFilename <arg>  Use this option to indicate the name of the backup-file  Important:  Use slash instead of backslash in the path definition  <arg> = <drive:/path/filename>  <arg> = <//server/share/path/filename>  If the target folder doesn‟t exist, it will be created.  Using #date# or #datetime# in the name to replace it with the current date (format: yyyyMMdd ) or with the current timestamp (format: yyyyMMdd_HHmmss)  Usage – example:  java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ - zipFilename c:/temp/zip/myZip#date#.zip  The above example will convert all files (with extension *.csv and *.txt) in the folder c:tempzip, and zip into the file myZip20121101.zip
  • 14. Option overview: CSVtoXML  Option: -extensionFilter <arg>  Default all files with extension *.csv and *.txt will be converted, use this option if you want to specify files with an other extension.  Important:  Use ; as delimiter if you want to specify more then one extension.  Usage – example:  java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ - extensionFilter csv;txt;prn  The above example will convert all files with extension *.csv, *.txt and *.prn in the folder c:tempcsv, into the same folder convert
  • 15. Option overview: CSVtoXML  Option: -delimiter <arg>  Default ; is used as delimiter in the csv-file, use this option if you want to use an other delimiter.  Usage – example:  java -jar <install dir>CSVtoXML.jar -sourceFolder c:/temp/csv/ - delimiter #  The above example will convert all files with extension *.csv, *.txt in the folder c:tempcsv, into the same folder, using a crossroad (#) as delimiter. csv xml
  • 16. Example: converting two csv-files to one xml-file  Suppose you want to monitor the number of BO accounts in a three pillar environment (dev, accept & production) on two different BO installations (Infra. One & Infra. Two)  On a daily basis you receive two csv-files (InfraOne.csv and InfraTwo.csv) in the C:tmpcsv folder.  Create a cmd-file with the following command to convert the two csv‟s to one xml-file.  java -jar CSVtoXML.jar -sourceFolder "C:/tmp/csv/" -destinationFolder "C:/tmp/xml/" - merge -xmlFilename MergedXML.xml  Create a dashboard using the XML-data connector  read the next slides for more info
  • 17. Example: converting two csv-files to one xml-file DWH Query & Export to csv Convert with CSVtoXML.jar
  • 18. Example: converting two csv-files to one xml-file
  • 19. Example: converting two csv-files to one xml-file Tip: define two Excel Named Ranges with the same name of your variable name – tag Important: The Import Named Ranges- button imports the Excel ranges, not the variable name-section in the xml-file!
  • 20. Example: converting two csv-files to one xml-file Refreshing your dashboard with new xml-data will result in a ‘Cannot Access External Data’ error message. You will need to make a trusted version of your swf-file! Steps 1. Right-click on the swf in the browser and click on Global Settings… 2. Click on the Advanced-tab and click on the Trusted Location Settings- button 3. Add the name of the swf-file as trusted file 4. Restart your dashboard in the browser
  • 21. Logging Services  Default „Log4j 1.2.16‟ from apache.org is used to log the program activity.  Read http://logging.apache.org/log4j/1.2/ for more info.  Tip: replace the original log4j.properties file in CSVtoXML.jar (use winzip to open the jar) with your own configuration file to customize the logging output.  More info:  http://www.tutorialspoint.com/log4j/log4j_configuration.htm  http://logging.apache.org/log4j/1.2//apidocs/org/apache/log4j/EnhancedPatternLayout.html