Sponsored Content
Top Forums Shell Programming and Scripting Writing xml from excel sheet .xls using perl script Post 302935012 by omkar.jadhav on Thursday 12th of February 2015 10:58:09 AM
Old 02-12-2015
Writing xml from excel sheet .xls using perl script

Hi all.

I am working on the below requirement of generating .xml file from .xls file which i have , can someone please help me or in writing the perl script for the same:

The xls file format is as below which has two columns and number of rows are not fixed:
Fixlet Name ID
MS14-064: Vulnerabilities in Windows OLE Could Allow Remote Code Execution - Windows Server 2008 SP2 - KB3006226 (x64) 1406401
MS14-052: Vulnerabilities in Windows OLE Could Allow Remote Code Execution - Windows Server 2008 SP2 - KB3006122 (x64) 45678


The required .xml format is as below :

<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
<Baseline>
<Title>Test-bigfix</Title>
<Description><![CDATA[&lt;enter a description of the baseline here&gt; ]]></Description>
<Relevance>true</Relevance>
<Category></Category>
<Source>Internal</Source>
<SourceID></SourceID>
<SourceReleaseDate>2014-11-12</SourceReleaseDate>
<SourceSeverity></SourceSeverity>
<CVENames></CVENames>
<SANSID></SANSID>
<MIMEField>
<Name>x-fixlet-modification-time</Name>
<Value>Wed, 12 Nov 2014 14:32:18 +0000</Value>
</MIMEField>
<Domain>BESC</Domain>
<BaselineComponentCollection>
<BaselineComponentGroup>
<BaselineComponent Name="MS14-064: Vulnerabilities in Windows OLE Could Allow Remote Code Execution - Windows Server 2008 SP2 - KB3006226 (x64)" IncludeInRelevance="true" SourceSiteURL="http://sync.bigfix.com/cgi-bin/bfgather/bessecurity" SourceID="1406401" ActionName="Action1">
<ActionScript></ActionScript>
<Relevance></Relevance>
</BaselineComponent>
<BaselineComponent Name="MS14-052: Vulnerabilities in Windows OLE Could Allow Remote Code Execution - Windows Server 2008 SP2 - KB3006122 (x64)" IncludeInRelevance="true" SourceSiteURL="http://sync.bigfix.com/cgi-bin/bfgather/bessecurity" SourceID="45678" ActionName="Action1">
<ActionScript></ActionScript>
<Relevance></Relevance>
</BaselineComponent>
</BaselineComponentGroup>
</BaselineComponentCollection>
</Baseline>
</BES>

basically from excel values under fixlet name and id columns should be picked and then added into xml in above format.
Please suggest as i am very much new to perl scripting but want to learn it.

Last edited by omkar.jadhav; 02-12-2015 at 12:03 PM.. Reason: incorrect formating
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Excel sheet modification using perl module

Is there any possibility to move the content from one cell to another cell (Excel sheet) using perl module? (3 Replies)
Discussion started by: kavi.mogu
3 Replies

2. Shell Programming and Scripting

Excel sheet modification using perl module

I need to insert new column to already existing file ..can any one help me..?? (6 Replies)
Discussion started by: kavi.mogu
6 Replies

3. Shell Programming and Scripting

Excel sheet modification using perl module

Hi , Is there any possibility to read excel sheet in column by column order ?...Thanks in advance,........ :confused: (1 Reply)
Discussion started by: kavi.mogu
1 Replies

4. Programming

Excel sheet modification using perl module

Hi , can any one tell me,"How to extract the same format from existing excel file to new excel file " using Spreadsheet::WriteExcel or Spreadsheet::ParseExcel module ??? Example_pgm: Below program is used to read existing excel file..In this program "my $cell = $_;" line is used to... (0 Replies)
Discussion started by: kavi.mogu
0 Replies

5. Shell Programming and Scripting

Perl : not capturing all the data from excel sheet

Hi folks, I am working on assignment that captures all the records(2 columns one column contains names and other contain date of birth) from excel sheet stored in a directory and checks for current date and month. If it matches current date and month then the matched records are printed as... (1 Reply)
Discussion started by: giridhar276
1 Replies

6. Shell Programming and Scripting

Perl : Deleting the records in the excel sheet

I have a excel sheet with contains the records as below.. also uploaded the input excelsheet and the output excel sheet(expected output). 322mpls32.net.xyz.comBW: 44.0 M Hrly Avg (IN /... (1 Reply)
Discussion started by: giridhar276
1 Replies

7. Shell Programming and Scripting

Perl Reading Excel sheet isssue

There is a perl scriptwhich will read Excel sheet and create one file(.v) . Excel sheet::: A B C D 1 cpu_dailog 2 3 4 Perl will create the file(.v) like thsi ::: assert (cpu_dailog_iso ==2) ; assert (cpu_dailog_reset ==3); assert (cpu_dailog_idle... (3 Replies)
Discussion started by: naaj_ila
3 Replies

8. Shell Programming and Scripting

Perl : to get all the hyperlinks from the xlsx sheet(hyperlinks not visible in excel sheet directly)

Hi folks, I have a requirement in perl to print all the hyperlink from the spreadsheet(xlsx). Spreadsheet contains few lines of hyperlink data (pic attached). P.S. Hyperlink is behind the data and not visible in excel sheet directly. Now using perl script I need to copy the hyperlinks in... (3 Replies)
Discussion started by: scriptscript
3 Replies

9. Shell Programming and Scripting

Summing up the data from different excel sheet into one excel sheet

Hi Folks, Can you please advise for any script in unix such that for example , i have 3 different excel sheet at the location /ppt/gfr/exc so the name s of the excel sheet are 1excel.xslx 2excel.xslx 3excel.xslx now in these 3 different excel sheet there is lot of data for example each... (3 Replies)
Discussion started by: punpun66
3 Replies

10. Shell Programming and Scripting

Writing in excel sheet using ksh

Hello, I'm trying to write a script to export a txt file to excel. The text file is a delimited with commas Example: Report Date,12/12/2014 Report By, Person Issue, Job Failed I tried exporting as csv and mailed to my id. But if I open the csv file the data is coming in single... (6 Replies)
Discussion started by: annamalaikasi
6 Replies
package-appclient(1M)					    Application Server Utility					     package-appclient(1M)

NAME
package-appclient - packs the application client container libraries and jar files SYNOPSIS
package-appclient Use the package-appclient command to pack the application client container libraries and jar files into an appclient.jar file. The created file is located at appserver_install_dir/lib/appclient/appclient.jar. The appclient.jar file provides an application client container package targeted at remote hosts that do not contain a server installation. The appclient.jar archive contains native code and can be used on a target machine that is of similar architecture as the machine where it was produced. So, for example, an appclient.jar produced on a Solaris SPARC platform cannot be used on a Windows client machine. After copying the appclient.jar file to a remote location, unjar it to get a set of libraries and jar files in the appclient directory After unjarring on the client machine, modify appclient_install_dir/config/asenv.conf (asenv.bat for Windows) as follows: o set AS_WEBSERVICES_LIB to appclient_install_dir/lib o set AS_NSS to appclient_install_dir/lib (appclient_install_dirin for Windows) o set AS_IMQ_LIB to appclient_install_dir/imq/lib o set AS_INSTALL to appclient_install_dir o set AS_JAVA to your JDK 1.4 home directory o set AS_ACC_CONFIG to appclient_install_dir/config/sun-acc.xml Modify appclient_install_dir/config/sun-acc.xml as follows: o Ensure the DOCTYPE file references appclient_install_dir/lib/dtds o Ensure that target-server address attribute refrences the server machine. o Ensure that target-server port attribute refrences the ORB port on the remote machine. o Ensure that log-service references a log file; if the user wants to put log messages to a log file. Modify appclient_install_dir/bin/appclient (appclient.bat for Windows) as follows: o change token %CONFIG_HOME% to appclient_install_dir/config ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ appclient(1M) Sun Java System Application Server March 2004 package-appclient(1M)
All times are GMT -4. The time now is 02:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy