Solved

Alternatives to  

Posted on 2003-12-02
19
1,142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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.…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

635 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