Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Trouble with Excel spreadsheet using VB.NET to generate the XML

From: "Hewitt, Cheryl" <Cheryl.Hewitt@------------------->
To:
Date: 5/1/2008 8:35:00 PM
I trying to create an Excel spreadsheet using VB.NET to generate the
XML.

The application queries a SQL database dependent on user selections via
a form with the results being output to Excel. The issue I am having is
that the generated xml does not have the following code at the top:

<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>

This is the generated xml I am getting:

<Workbook xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user="urn:my-scripts"
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">
<Styles>
	<Style ss:ID="Default" ss:Name="Normal">
		<Alignment ss:Horizontal="Left" ss:Vertical="Bottom" />
		<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="1" />
			<Border ss:Position="Top"
ss:LineStyle="Continuous" ss:Weight="1" />
		</Borders>
		<Font ss:FontName="Times New Roman" x:Family="Roman"
ss:Size="8" />
		<Interior />
		<NumberFormat />
		<Protection />
	</Style>
	<Style ss:ID="s21">
		<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="1" />
			<Border ss:Position="Top"
ss:LineStyle="Continuous" ss:Weight="1" />
		</Borders>
		<Font ss:FontName="Times New Roman" x:Family="Roman"
ss:Size="8" />
		<Alignment ss:Horizontal="Left" ss:Vertical="Bottom" />
	</Style>
	<Style ss:ID="s22">
		<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="1" />
			<Border ss:Position="Top"
ss:LineStyle="Continuous" ss:Weight="1" />
		</Borders>
		<Font ss:FontName="Times New Roman" x:Family="Roman"
ss:Size="8" ss:Color="#000000" ss:Bold="1" />
		<Interior ss:Color="#00CCFF" ss:Pattern="Solid" />
	</Style>
	<Style ss:ID="s23">
		<Alignment ss:Horizontal="Left" ss:Vertical="Bottom" />
		<Font ss:FontName="Times New Roman" x:Family="Roman"
ss:Color="#000000" ss:Size="8" />
	</Style>
</Styles>
<Worksheet ss:Name="Table">
	<Table x:FullColumns="1" x:FullRows="1">
	<Row ss:Height="50">
		<Cell ss:StyleID="s22"><Data
ss:Type="String">ID</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">Fund_Activity</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">TypeOfAccount</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">AccountName</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">Amount</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">Audit</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">Agency</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">TypeOfFund</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">Description</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">Cause</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">WorkPaperReference</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">Category</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">ImpactFinancialStmts</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">CommunicationModeByMgmt</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">noAdjReason</Data></Cell>
		<Cell ss:StyleID="s22"><Data
ss:Type="String">PotentialFindingIndicator</Data></Cell>
	</Row>
	<Row>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">83</Data></Cell>
		<Cell ss:StyleID="s21"><Data ss:Type="String">MA Trust
Fund</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">Asset</Data></Cell>
		<Cell ss:StyleID="s21"><Data ss:Type="String">Cash and
Cash Equivalents</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">33444444.00</Data></Cell>
		<Cell ss:StyleID="s21"><Data ss:Type="String">1163 -
CAFR - DOA Central FY 2006</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">Administration</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">Governmental Fund</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">adfad</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">dsfsdf</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">sdfsdf</Data></Cell>
		<Cell ss:StyleID="s21"><Data ss:Type="String">Audit
Adjustment</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">No</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String"></Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String"></Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">No</Data></Cell>
	</Row>
	<Row>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">83</Data></Cell>
		<Cell ss:StyleID="s21"><Data ss:Type="String">MA Trust
Fund</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">Revenue</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">Intergovernmental</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">-4543534543.00</Data></Cell>
		<Cell ss:StyleID="s21"><Data ss:Type="String">1163 -
CAFR - DOA Central FY 2006</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">Administration</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">Governmental Fund</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">adfad</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">dsfsdf</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">sdfsdf</Data></Cell>
		<Cell ss:StyleID="s21"><Data ss:Type="String">Audit
Adjustment</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">No</Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String"></Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String"></Data></Cell>
		<Cell ss:StyleID="s21"><Data
ss:Type="String">No</Data></Cell>
	</Row>
	</Table>
</Worksheet>
</Workbook>

**************************
Any insight as to how to get these lines into the output would be
greatly appreciated! :)

TIA,

-Cheryl


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent