+ Reply to Thread
Results 1 to 1 of 1

Whitespaces created in multi-child elements when using Excel to open XML file

Hybrid View

  1. #1
    Registered User
    Join Date
    03-11-2010
    Location
    Brasil
    MS-Off Ver
    Excel 2003
    Posts
    1

    Whitespaces created in multi-child elements when using Excel to open XML file

    I have created a little script that creates an XML file for the user. However, the XML file created will always have an exponent in one of the elements. In order to present this, I wrote:

    <Cell ss:MergeAcross='1' ss:StyleID='m302852124'>
        <ss:Data  ss:Type='String' xmlns='http://www.w3.org/TR/REC-html40'>
            <B>
                 <Font>ΔP (kgf/cm</Font>
                 <Sup>2</Sup>
                 <Font>)</Font>
            </B>
        </ss:Data>
        <NamedCell ss:Name='Print_Area'/>
    </Cell>
    That is accepted and runs smoothly when opened in Excel, except for the fact that the output is:
    " . . . . . . . . . . . . . . . ΔP (kgf/cm . . . . . . . 2 . . . . . . . ) " [periods placed to display extra white spaces which are otherwise truncated in this forum]

    This problem also repeats itself in the case of

    <Cell  ss:StyleID='s32'>
        <ss:Data ss:Type='String' xmlns='http://www.w3.org/TR/REC-html40'>
            <B>
                <Font>ΔP  (kPa)</Font>
            </B>
        </ss:Data>
        <NamedCell ss:Name='Print_Area'/>
    </Cell>
    Where the output is:
    " . . . . . . . . . . . . ΔP (kPa) . . . . . . . . . . "

    Other elements, containing no child-elements under <Data> have no such spacing problems. It's also worth mentioning that I built the script by creating a template on Excel and then saving it as an .xml instead of as an .xls
    Last edited by wasabi; 03-11-2010 at 10:37 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1