Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 26th, 2005, 01:24 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Syntax and formatting Help

I have two probably easy questions :)

The first is - what is wrong with this syntax:
<Worksheet ss:Name="[substring('{Metadata/WorksheetName}_Hist',1,31)]">

This is a stylesheet for excel - I want to account for names that could go beyond the max length of 31.

This is the message I get:
XML ERROR in Workbook Setting
REASON: Bad Value
FILE: C:\DOCUME~1\bgunion\LOCALS~1\Temp\17.tmp
GROUP: Workbook
TAG: Worksheet
ATTRIB: Name
VALUE: [substring('Active_insAll_$$_Hist',1,31)]

The second question has to do with a documentation sheet. The sql code must be documented in the workbook. The code has indents and spaces like:

Update tblTriangle_Dollar
    SET Loantotal = a.loans
    FROM (
    SELECT Year(dateContract) Year, datepart(q,datecontract) MQ,
        sum(amtloan) Loans
        FROM loantable
        WHERE dateofdata = 'Sep 30 2004 12:00AM' ....

I can retrieve this code from the data and get it in to an xml file (with spaces) but when I open it in excel i get:

Update tblTriangle_Dollar SET Loantotal = a.loans
FROM (SELECT Year(dateContract) Year, datepart(q,datecontract) MQ,sum(amtloan) Loans FROM smolinski.tblMasterMonthlyData20040930 WHERE dateofdata = 'Sep 30 2004 12:00AM'

Without word-wrap it is one long string. I would like to keep the indents.
Currently the code is one cell (e.g. <code>my code<code/>) - In other word each line is not separate out. It is formatted the way i want it in text form - it just doesn't translate to excel.

Thanks!



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
whats a good tool for auto-formatting SQL Syntax?? callagga SQL Language 1 August 29th, 2008 12:11 PM
Cell formatting Neal Excel VBA 0 May 9th, 2006 08:02 AM
Formatting syrex XSLT 2 November 5th, 2005 08:23 AM
formatting reports clueless_may Access VBA 1 May 14th, 2004 01:58 AM
Formatting Ben Access 3 February 28th, 2004 05:52 AM



All times are GMT -4. The time now is 12:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.