Solved

Alternatives to  

Posted on 2003-12-02
19
1,129 Views
Last Modified: 2012-05-04
Does anyone know of an alternate way to add spaces to HTML without using " "?

Our users are opening an HTML page we have created in Excel. Everything is fine except the space convert to A0 in Excel and Excel doesn't know what to do with them.
0
Comment
Question by:feign3
  • 3
  • 3
  • 3
  • +5
19 Comments
 
LVL 31

Accepted Solution

by:
seanpowell earned 50 total points
ID: 9858590
Have you tried using the spacerun attribute - Excel should be okay with it:

Hello<span style="mso-spacerun: yes">     </span>There
0
 
LVL 4

Expert Comment

by:bschwarz6
ID: 9858609
unfortunately, i believe this is the only way to add more than one space between characters.
you can check out the W3 for more information:
http://www.w3.org/TR/1998/REC-html40-19980424/struct/text.html

I am unsure what you are saying in the second part of your question:

"Everything is fine except the space convert to A0 in Excel and Excel doesn't know what to do with them."

if you could elaborate on that, i could give a shot at a solution.


b
0
 

Author Comment

by:feign3
ID: 9858646
Hi bschwarz,

I just meant that Excel turns the "&nbsp;"'s into "A0". Not really relevent... just suffice it to say that Excel doesn't like the HTML spaces.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 11

Expert Comment

by:Zontar
ID: 9858666
Why specifically are you adding non-breaking spaces to the page?

Perhaps your design can be changed to eliminate the need for them.
0
 
LVL 2

Expert Comment

by:Netwing
ID: 9858754
Use transparent Spacing Gifs for the Spacing! I think with these Images it should work in Excel too.
0
 

Author Comment

by:feign3
ID: 9858794
Zontar,

It's a customer specified report created using Oracle's iAS. The design must remain the same.
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9858841
I take it the spacerun attribute didn't do the trick?
0
 
LVL 3

Expert Comment

by:mrh30
ID: 9858864
Could always use <pre> </pre> round the text and then give it an appropriate style to make it look like the rest of the text.
0
 
LVL 2

Expert Comment

by:Netwing
ID: 9859007
..or use a white -  for the spacing on the white background it should be invisible for our humen eyes...i know it's dirty but it's a solution.
0
 

Author Comment

by:feign3
ID: 9859082
seanpowell,

Haven't had a chance to try it yet. I'll be able to tell you in about 30 minutes.

It sounds the most promising.
0
 

Expert Comment

by:Nelson_Pires
ID: 9866400
Alternatively if you use ASP, you could parse it to replace all HTML space codes to proper spaces ( ), use the replace function like this:

parsedSPACE = yourDataWithSpaces
parsedSPACE = Replace(parsedSPACE, "&nbsp;", " ", 1, -1, 1)

Now the parsedSPACE will be holding everything but with proper spaces.
0
 
LVL 1

Expert Comment

by:dazzled1
ID: 9942431
 
Using a pl/sql procedure you might be able to do something like this...


This is how I usually write excel files from 9iAS

The chr(9) bit is the bit that puts the space in!

 owa_util.mime_header( 'application/excel' );
   for x in ( select * from employees) loop
      htp.p( x.name || chr(9) || x.surname);
   end loop;

0
 
LVL 11

Expert Comment

by:Zontar
ID: 9942898
> It's a customer specified report created using Oracle's iAS. The design must remain the same.

You didn't answer my question.
0
 
LVL 1

Expert Comment

by:dazzled1
ID: 9944482


   Well try putting this  &#009

   in the same way you would put &nbsp..


   By the way the 9 is TAB but there are other ascii characters that may work aswell!!


Enjoy....


(http://www.efn.org/~gjb/asciidec.html - A table of all ascii characters - just substitute the decimal number for the 009. EG &#112 etc...
0
 
LVL 11

Expert Comment

by:Zontar
ID: 9944787
dazzled1 -- don't forget the terminal semicolon in character entities.

&#009; not &#009

What I was going to suggest was using CSS padding and/or margins and/or text0indent, but feign3 is not going to play along by provding a link and/or source and/or description, so I can't actually provide a possible solution making use of it.
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 10800871
http:#9858590 should work in any instance of Excel, AFAIK.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sort Order Icons on HTML Table 3 33
Diminish Pop-up  in 3 seconds 7 47
Javascript the "if condition with Or" 8 29
Html value of radio 14 27
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question