Click here to Skip to main content
15,896,915 members
Home / Discussions / C#
   

C#

 
GeneralBitmap file Pin
Saleh Alshadheli17-May-04 6:45
Saleh Alshadheli17-May-04 6:45 
GeneralRe: Bitmap file Pin
Dave Kreskowiak17-May-04 6:55
mveDave Kreskowiak17-May-04 6:55 
GeneralRe: Bitmap file Pin
Heath Stewart17-May-04 7:21
protectorHeath Stewart17-May-04 7:21 
GeneralPotential Field Algorithms Pin
sodium17-May-04 6:45
sodium17-May-04 6:45 
GeneralRe: Potential Field Algorithms Pin
Dave Kreskowiak17-May-04 7:14
mveDave Kreskowiak17-May-04 7:14 
GeneralRe: Potential Field Algorithms Pin
sodium17-May-04 20:11
sodium17-May-04 20:11 
GeneralRe: Potential Field Algorithms Pin
Dave Kreskowiak18-May-04 0:08
mveDave Kreskowiak18-May-04 0:08 
GeneralConverting xsd to csv using xslt Pin
tunde17-May-04 6:44
tunde17-May-04 6:44 
Smile | :) I am having a problem with xsd convertion to csv file. The code below describes how I attempted to approach the problem. The code works but the output is not properly format.

ObjBISReports As DsReports (a type dataset)
.. after the dataset has been filled using sqldatadapter
ObjBISReports.WriteXml("C:\Tunde.xml", XmlWriteMode.IgnoreSchema)

Dim xslt As New XslTransform()
xslt.Load("F:\Alliance International\Projects\AIA Database Application\Application2\Components\GetOutStanding.xslt")

Dim doc As New XmlDocument()
doc.Load("C:\Tunde.xml")

'Create an XmlTextWriter which outputs to a file.
Dim fileName As String = "C:\tunde.csv"

Dim writer As XmlWriter = New XmlTextWriter(fileName, Nothing)

'Transform the data and send the output to the console.
xslt.Transform(doc, Nothing, writer)
writer.Close()

This is the stylesheet format:

"<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:template match="DsReports">
<xsl:apply-templates select="GetOutStandingBills"/>
</xsl:template>

<xsl:template match="GetOutStandingBills">
<xsl:for-each select="*">
<xsl:value-of select="."/>
<xsl:if test="position() != last()">
<xsl:value-of select="','"/>
</xsl:if>
</xsl:for-each>
<xsl:text>&#10;</xsl:text>
</xsl:template>

</xsl:stylesheet>"

Please if anyone knows a much effective means of converting xsd to csv or excel could you let me know.
Thank You




Tunde Olawuwo
GeneralRe: Converting xsd to csv using xslt Pin
Heath Stewart17-May-04 7:17
protectorHeath Stewart17-May-04 7:17 
GeneralRe: Converting xsd to csv using xslt Pin
tunde17-May-04 13:02
tunde17-May-04 13:02 
GeneralBitmaps Pin
Saleh Alshadheli17-May-04 6:30
Saleh Alshadheli17-May-04 6:30 
GeneralRe: Bitmaps Pin
Dave Kreskowiak17-May-04 6:40
mveDave Kreskowiak17-May-04 6:40 
QuestionWhy this default Directory? Pin
Adam °Wimsatt17-May-04 5:38
Adam °Wimsatt17-May-04 5:38 
AnswerRe: Why this default Directory? Pin
Heath Stewart17-May-04 5:57
protectorHeath Stewart17-May-04 5:57 
GeneralRe: Why this default Directory? Pin
Adam °Wimsatt17-May-04 6:04
Adam °Wimsatt17-May-04 6:04 
GeneralRe: Why this default Directory? Pin
Heath Stewart17-May-04 6:19
protectorHeath Stewart17-May-04 6:19 
Generalusing excel in c# problem Pin
Russell Jones17-May-04 5:37
Russell Jones17-May-04 5:37 
GeneralRe: using excel in c# problem Pin
Heath Stewart17-May-04 5:54
protectorHeath Stewart17-May-04 5:54 
GeneralC# design question Pin
pankajdaga17-May-04 5:01
pankajdaga17-May-04 5:01 
GeneralRe: C# design question Pin
Heath Stewart17-May-04 5:10
protectorHeath Stewart17-May-04 5:10 
GeneralRe: C# design question Pin
pankajdaga17-May-04 7:32
pankajdaga17-May-04 7:32 
GeneralManaging 3 applications at the same time Pin
Diego F.17-May-04 4:55
Diego F.17-May-04 4:55 
GeneralRe: Managing 3 applications at the same time Pin
Heath Stewart17-May-04 5:06
protectorHeath Stewart17-May-04 5:06 
GeneralRe: Managing 3 applications at the same time Pin
Diego F.17-May-04 5:33
Diego F.17-May-04 5:33 
GeneralRe: Managing 3 applications at the same time Pin
Heath Stewart17-May-04 5:38
protectorHeath Stewart17-May-04 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.