PC Review


Reply
Thread Tools Rate Thread

Creating multiple sheets and populating data in it from two diffrent dataset

 
 
New Member
Join Date: Sep 2008
Posts: 1
 
      2nd Sep 2008
hello frds
can someone please help me in creating multiple sheets in excel and populating it with data set. i am able to craete one sheet but while add one more worksheet tag in xls file and run it ,it give me message as corrupted file.




my code

<xsl:stylesheetversion="1.0"

xmlns="urn:schemas-microsoft-comffice:spreadsheet"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:msxsl="urn:schemas-microsoft-com:xslt"

xmlns:user="urn:my-scripts"

xmlns="urn:schemas-microsoft-comfficeffice"

xmlns:x="urn:schemas-microsoft-comffice:excel"

xmlns:ss="urn:schemas-microsoft-comffice:spreadsheet" >



<
xsl:templatematch="/">

<
Workbookxmlns="urn:schemas-microsoft-comffice:spreadsheet"

xmlns="urn:schemas-microsoft-comfficeffice"

xmlns:x="urn:schemas-microsoft-comffice:excel"

xmlns:ss="urn:schemas-microsoft-comffice:spreadsheet"



xmlns:html="http://www.w3.org/TR/REC-html40">

<
xsl:apply-templates/>

</
Workbook>

</
xsl:template>



<
xsl:templatematch="/*">



<
Worksheet>

<
xsl:attributename="ss:Name" >

<
xsl:value-ofselect="local-name(/*/*)"/>

</
xsl:attribute>

<
Tablex:FullColumns="1"x:FullRows="1">

<
Row>

<
xsl:for-eachselect="*[position() = 1]/*">

<
Cell><Datass:Type="String">

<
xsl:value-ofselect="local-name()"/>

</
Data></Cell>

</
xsl:for-each>

</
Row>

<
xsl:apply-templates/>

</
Table>

</
Worksheet>

</
xsl:template>



<
xsl:templatematch="/*/*">

<
Row>

<
xsl:apply-templates/>

</
Row>

</
xsl:template>



<
xsl:templatematch="/*/*/*">

<
Cell><Datass:Type="String">

<
xsl:value-ofselect="."/>

</
Data></Cell>

</
xsl:template>



</
xsl:stylesheet>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a macro to filter data on multiple sheets catfish#hunter Microsoft Excel Programming 0 22nd May 2008 09:10 PM
Data sheet populating into multiple sheets =?Utf-8?B?U2hhdW4=?= Microsoft Excel New Users 5 28th Feb 2007 01:31 PM
Data Sheet populating to multiple sheets =?Utf-8?B?U2hhdW4=?= Microsoft Excel Worksheet Functions 1 22nd Feb 2007 04:35 PM
Populating multiple cells on other sheets via data validation kuansheng Microsoft Excel Programming 0 14th Feb 2006 06:08 AM
populating sheets based on data from parent sheets seve Microsoft Excel Misc 2 15th Jan 2005 09:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 AM.