Avatar of introlux
introluxFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

Need to convert excel file to XSL

Hi I needed to format template. I would like it to look like the excel file.

I have uploaded the excel file

https://filedb.experts-exchange.com/incoming/ee-stuff/7199-Example.zip 

Thanks and really appreciate this,

introlux
Web Languages and Standards

Avatar of undefined
Last Comment
introlux
ASKER CERTIFIED SOLUTION
Avatar of kmartin7
kmartin7
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of introlux
introlux
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Qulaity answer!
Avatar of introlux
introlux
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Hey I really appreciate this help you have given me! Thanks and thank again!
Avatar of introlux
introlux
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I have tried to make one myself but i keep getting an error. Can you look at this code quickly and let me know where I have gone wrong??
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel"
                xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="urn:schemas-microsoft-com:office:spreadsheet">
	<xsl:output indent="yes" method="xml"/>
	<xsl:template match="/">
		<xsl:processing-instruction name="mso-application">progid="Excel.Sheet"</xsl:processing-instruction>
		<xsl:text>
	</xsl:text>
		<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
		          xmlns:html="http://www.w3.org/TR/REC-html40">
			<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
				<Author>amber.yang</Author>
				<LastAuthor>Kurt D Martin</LastAuthor>
				<LastPrinted>2008-07-03T15:14:20Z</LastPrinted>
				<Created>2008-02-19T18:14:36Z</Created>
				<LastSaved>2008-07-03T15:15:34Z</LastSaved>
				<Version>11.9999</Version>
			</DocumentProperties>
			<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
				<WindowHeight>9405</WindowHeight>
				<WindowWidth>15480</WindowWidth>
				<WindowTopX>120</WindowTopX>
				<WindowTopY>120</WindowTopY>
				<ProtectStructure>False</ProtectStructure>
				<ProtectWindows>False</ProtectWindows>
			</ExcelWorkbook>
			<Styles>
				<Style ss:ID="Default" ss:Name="Normal">
					<Alignment ss:Vertical="Bottom"/>
					<Borders/>
					<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
					<Interior/>
					<NumberFormat/>
					<Protection/>
				</Style>
				<Style ss:ID="s60" ss:Name="Percent">
					<NumberFormat ss:Format="0%"/>
				</Style>
				<Style ss:ID="m168389726">
					<Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
					<Borders>
						<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
						<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="3"/>
					</Borders>
					<Font ss:FontName="Verdana" x:Family="Swiss" ss:Size="12" ss:Color="#FFFFFF"/>
					<Interior ss:Color="#000000" ss:Pattern="Solid"/>
				</Style>
				<Style ss:ID="m168389746">
					<Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
					<Borders>
						<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
						<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
					</Borders>
					<Font ss:FontName="Trebuchet MS" x:Family="Swiss" ss:Color="#000000" ss:Bold="1"/>
					<Interior ss:Color="#969696" ss:Pattern="Solid"/>
				</Style>
				<Style ss:ID="m168389756">
					<Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
					<Borders>
						<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
						<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
					</Borders>
					<Font ss:FontName="Trebuchet MS" x:Family="Swiss" ss:Color="#000000" ss:Bold="1"/>
					<Interior ss:Color="#969696" ss:Pattern="Solid"/>
				</Style>
				<Style ss:ID="m168389766">
					<Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
					<Borders>
						<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
						<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
					</Borders>
					<Font ss:FontName="Trebuchet MS" x:Family="Swiss" ss:Color="#000000" ss:Bold="1"/>
					<Interior ss:Color="#969696" ss:Pattern="Solid"/>
				</Style>
				<Style ss:ID="s64">
					<Alignment ss:Horizontal="Left" ss:Vertical="Center"/>
					<Borders>
						<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
						<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
						<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
					</Borders>
					<Font ss:FontName="Trebuchet MS" x:Family="Swiss" ss:Color="#000000" ss:Bold="1"/>
				</Style>
				<Style ss:ID="s67" ss:Parent="s60">
					<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
				</Style>
				<Style ss:ID="s68">
					<Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/>
					<Borders>
						<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
						<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
						<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3"/>
						<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
					</Borders>
					<Font ss:FontName="Trebuchet MS" x:Family="Swiss" ss:Color="#000000"/>
				</Style>
			</Styles>
			<xsl:apply-templates/>
		</Workbook>
	</xsl:template>
 
	<xsl:template match="userInfo">
		<xsl:for-each select="browserInfo">
			<Worksheet>
				<xsl:attribute name="ss:Name">
					<xsl:text>Sheet</xsl:text>
					<xsl:number count="browserInfo" from="userInfo"/>
				</xsl:attribute>
				<Table ss:ExpandedColumnCount="5" x:FullColumns="1" x:FullRows="1" ss:DefaultRowHeight="15">
					<Column ss:Width="449.25"/>
					<Column ss:AutoFitWidth="0" ss:Width="348"/>
					<Row ss:AutoFitHeight="0">
						<Cell ss:MergeAcross="1" ss:StyleID="m168389726">
							<Data ss:Type="String">Operation Form</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:MergeAcross="1" ss:StyleID="m168389746">
							<Data ss:Type="String">Operational project details</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Project Manager:</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="PManager"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Project Co-Ordinator:</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="PCoOrdinator"/>
							</Data>
						</Cell>
						<Cell ss:Index="5" ss:StyleID="s67"/>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Scripter:</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="Scripter"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Sample Supplier: (supplier name/name of panel of survey)</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="SSup"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:MergeAcross="1" ss:StyleID="m168389756">
							<Data ss:Type="String">Project Close Details</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Subject Line (per market)::</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="SLine"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">ACTUAL field start date (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="ActFSD"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">ACTUAL field finish data date (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="ActFFDD"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">ACTUAL field final data date (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="Number">
								<xsl:value-of select="ActFFnlDD"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0" ss:Height="19.5">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">ACTUAL length of interview (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="ActLOI"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Final quota counts (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="FQC"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Number of quota fulls (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="NumQFalls"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Number of Screenouts (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="NumScreen"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Final IR (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="FIR"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Number of invites sent (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="NumIntSent"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0" ss:Height="62.25">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Final Response Rate (per market):</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="FResRate"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Issues:</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="Issues"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:MergeAcross="1" ss:StyleID="m168389766">
							<Data ss:Type="String">Final Project Status</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0" ss:Height="59.25">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Operational Project Status:</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="opProStatus"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Invoiceable:</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="Invoiceable"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Delivery on Time and on Spec:</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="delTimeOnSpec"/>
							</Data>
						</Cell>
					</Row>
					<Row ss:AutoFitHeight="0">
						<Cell ss:StyleID="s64">
							<Data ss:Type="String">Reasons for not closing on time (if applicable)</Data>
						</Cell>
						<Cell ss:StyleID="s68">
							<Data ss:Type="String">
								<xsl:value-of select="ResCloseTime"/>
							</Data>
						</Cell>
					</Row>
				</Table>
				<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
					<PageSetup>
						<Header x:Margin="0.31496062992125984"/>
						<Footer x:Margin="0.31496062992125984"/>
						<PageMargins x:Bottom="0.74803149606299213" x:Left="0.70866141732283472" x:Right="0.70866141732283472" x:Top="0.74803149606299213"/>
					</PageSetup>
					<Unsynced/>
					<FitToPage/>
					<Print>
						<ValidPrinterInfo/>
						<Scale>82</Scale>
						<HorizontalResolution>600</HorizontalResolution>
						<VerticalResolution>2</VerticalResolution>
					</Print>
					<Selected/>
					<Panes>
						<Pane>
							<Number>3</Number>
							<RangeSelection>R1</RangeSelection>
						</Pane>
					</Panes>
					<ProtectObjects>False</ProtectObjects>
					<ProtectScenarios>False</ProtectScenarios>
				</WorksheetOptions>
			</Worksheet>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>

Open in new window

Avatar of kmartin7
kmartin7
Flag of United States of America image

What is the error? I don't have sample data for this specific one. When I run it, I do not get any errors - only no data is filled in because I don't have sample input data.
Avatar of introlux
introlux
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER


<?xml version="1.0" encoding="utf-8"?>
<userInfo>
  <browserInfo Data_Submitted="28/07/2008 10:15:49">
    <PManager>Smith</PManager>
    <PCoOrdinator>Frank</PCoOrdinator>
    <Scripter>Testing</Scripter>
    <SSup>ewewew</SSup>
    <SLine>wewew</SLine>
    <ActFSD>As quoted</ActFSD>
    <ActFFDD>As quoted</ActFFDD>
    <ActFFnlDD>As quoted</ActFFnlDD>
    <ActLOI>As quoted</ActLOI>
    <FQC>As quoted</FQC>
    <NumQFalls>wewe</NumQFalls>
    <NumScreen>ewew</NumScreen>
    <FIR>As quoted</FIR>
    <NumIntSent>wewe</NumIntSent>
    <FResRate>wewew</FResRate>
    <Issues>None</Issues>
    <opProStatus>Draft</opProStatus>
    <Invoiceable>Yes</Invoiceable>
    <delTimeOnSpec>Yes</delTimeOnSpec>
    <ResCloseTime>N/A</ResCloseTime>
  </browserInfo>
  <browserInfo />
</userInfo>

Open in new window

Avatar of kmartin7
kmartin7
Flag of United States of America image

Find:

<Data ss:Type="Number">
      <xsl:value-of select="ActFFnlDD"/>
</Data>

And replace with:

<Data ss:Type="String">
      <xsl:value-of select="ActFFnlDD"/>
</Data>

You have identified in your excel template the value of this cell to be a number. The input data is a string (your example has the value 'As quoted'). So if you change the cell type to string it will work.

kmartin7
Avatar of introlux
introlux
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

opps! minor little error! thanks it sorted out the prob
Web Languages and Standards
Web Languages and Standards

Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services using a wide variety of languages and standards, including the familiar HTML, JavaScript and jQuery, ASP and ASP.NET, PHP, ColdFusion, CSS, PHP, Flex and Flash, but also the implementation of a broad list of standards including XML, WSDL, SSDL, VoiceXML and many more.

40K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo